summaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-08-24 12:00:37 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-08-24 15:14:05 +0200
commite88b380973b54bc7b8bc86f888b1f11ae8e54076 (patch)
treeeb26a996febd377d21d756fdddd884a1a2ea451d /lib/private/server.php
parenta67a2272e77485391695af84644e7a9074e50af8 (diff)
downloadnextcloud-server-e88b380973b54bc7b8bc86f888b1f11ae8e54076.tar.gz
nextcloud-server-e88b380973b54bc7b8bc86f888b1f11ae8e54076.zip
Remove DEBUG constant and use config value
* introduces config.php option 'debug' that defaults to false * migrate DEBUG constant to config value
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index 92a671c721d..5a3a6328fae 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -329,14 +329,14 @@ class Server extends SimpleContainer implements IServerContainer {
);
});
$this->registerService('EventLogger', function (Server $c) {
- if (defined('DEBUG') and DEBUG) {
+ if ($c->getSystemConfig()->getValue('debug', false)) {
return new EventLogger();
} else {
return new NullEventLogger();
}
});
- $this->registerService('QueryLogger', function ($c) {
- if (defined('DEBUG') and DEBUG) {
+ $this->registerService('QueryLogger', function (Server $c) {
+ if ($c->getSystemConfig()->getValue('debug', false)) {
return new QueryLogger();
} else {
return new NullQueryLogger();