summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-12-01 23:00:51 +0100
committerJoas Schilling <coding@schilljs.com>2021-12-01 23:00:51 +0100
commit68d53988f639a9586a7574a4cdcb6c6e1b05cd47 (patch)
treef74f62312e790752ed45380504cf33535503aa5d /lib/private/Server.php
parent44ecd0d1d5f77e6798c1dd08da8120ba86585758 (diff)
downloadnextcloud-server-68d53988f639a9586a7574a4cdcb6c6e1b05cd47.tar.gz
nextcloud-server-68d53988f639a9586a7574a4cdcb6c6e1b05cd47.zip
Fix log_query config flag
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index baebbe7558d..f9aee416dd4 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -688,7 +688,16 @@ class Server extends ServerContainer implements IServerContainer {
$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();