summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-12-02 10:32:04 +0100
committerGitHub <noreply@github.com>2021-12-02 10:32:04 +0100
commit91db6040c87012aacb459c07a534189cb3e43f63 (patch)
treefe1b9c53cfaf475c11b4f68947fe4c9da74e3804 /lib/private/Server.php
parentd5e4197875bc46544e04915e546980c1f09ba48f (diff)
parent68d53988f639a9586a7574a4cdcb6c6e1b05cd47 (diff)
downloadnextcloud-server-91db6040c87012aacb459c07a534189cb3e43f63.tar.gz
nextcloud-server-91db6040c87012aacb459c07a534189cb3e43f63.zip
Merge pull request #30028 from nextcloud/bugfix/noid/fix-log_query
Fix log_query config flag
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 c0c69749aa8..d1e038d971e 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();