diff options
author | Joas Schilling <coding@schilljs.com> | 2016-07-25 11:41:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-25 11:41:24 +0200 |
commit | 4ad0c383ade90eb2f339daa392828e145f1a3b6b (patch) | |
tree | 0c223080b36bbff7a2aaeef3bb5db2d97c408dee /lib/private | |
parent | 6a25e5f0eb56d3c712a2025a2df590a6da651dab (diff) | |
parent | 61a1d56d2784d407ac0922ea1fcd382b21f3df06 (diff) | |
download | nextcloud-server-4ad0c383ade90eb2f339daa392828e145f1a3b6b.tar.gz nextcloud-server-4ad0c383ade90eb2f339daa392828e145f1a3b6b.zip |
Merge pull request #523 from Faldon/master
Renamed file logging
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Log.php | 7 | ||||
-rw-r--r-- | lib/private/Log/File.php (renamed from lib/private/Log/Owncloud.php) | 2 | ||||
-rw-r--r-- | lib/private/Server.php | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/lib/private/Log.php b/lib/private/Log.php index 59233cf5c12..0a707f3d4ea 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -103,7 +103,12 @@ class Log implements ILogger { // FIXME: Add this for backwards compatibility, should be fixed at some point probably if($logger === null) { - $this->logger = 'OC\\Log\\'.ucfirst($this->config->getValue('log_type', 'owncloud')); + // TODO: Drop backwards compatibility for config in the future + $logType = $this->config->getValue('log_type', 'file'); + if($logType==='owncloud') { + $logType = 'file'; + } + $this->logger = 'OC\\Log\\'.ucfirst($logType); call_user_func(array($this->logger, 'init')); } else { $this->logger = $logger; diff --git a/lib/private/Log/Owncloud.php b/lib/private/Log/File.php index 2cc70015e3c..a406dd83952 100644 --- a/lib/private/Log/Owncloud.php +++ b/lib/private/Log/File.php @@ -39,7 +39,7 @@ namespace OC\Log; * Log is saved at data/nextcloud.log (on default) */ -class Owncloud { +class File { static protected $logFile; /** diff --git a/lib/private/Server.php b/lib/private/Server.php index 76d6bbad1ef..41092ceae6e 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -364,8 +364,9 @@ class Server extends ServerContainer implements IServerContainer { ); }); $this->registerService('Logger', function (Server $c) { - $logClass = $c->query('AllConfig')->getSystemValue('log_type', 'owncloud'); - $logger = 'OC\\Log\\' . ucfirst($logClass); + $logClass = $c->query('AllConfig')->getSystemValue('log_type', 'file'); + // TODO: Drop backwards compatibility for config in the future + $logger = 'OC\\Log\\' . ucfirst($logClass=='owncloud' ? 'file' : $logClass); call_user_func(array($logger, 'init')); return new Log($logger); |