From 68d53988f639a9586a7574a4cdcb6c6e1b05cd47 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 1 Dec 2021 23:00:51 +0100 Subject: Fix log_query config flag Signed-off-by: Joas Schilling --- lib/private/Server.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib') 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(); -- cgit v1.2.3