Skip to content

Commit

Permalink
Merge pull request #30038 from nextcloud/backport/30028/stable22
Browse files Browse the repository at this point in the history
[stable22] Fix log_query config flag
  • Loading branch information
nickvergessen authored Dec 2, 2021
2 parents 68b16b7 + 64834a0 commit ea6c0f3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/private/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,16 @@ public function __construct($webRoot, \OC\Config $config) {
$config = $c->get(\OCP\IConfig::class);

if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
$v = \OC_App::getAppVersions();
if (!$config->getSystemValueBool('log_query')) {
$v = \OC_App::getAppVersions();
} else {
// If the log_query is enabled, we can not get the app versions
// as that does a query, which will be logged and the logging
// depends on redis and here we are back again in the same function.
$v = [
'log_query' => 'enabled',
];
}
$v['core'] = implode(',', \OC_Util::getVersion());
$version = implode(',', $v);
$instanceId = \OC_Util::getInstanceId();
Expand Down

0 comments on commit ea6c0f3

Please sign in to comment.