From ba3f4f118e8c48a23dcffa723e38439f0b9b7df9 Mon Sep 17 00:00:00 2001 From: Thomas Pulzer Date: Fri, 22 Jul 2016 11:44:19 +0200 Subject: Changed logtype to file instead of owncloud. - Updated the config sample to point to log_type='file' - Renamed the Class for logfile logging to File in namespace 'OC\Log\'. Changed the occurrences of 'OC\Log\Owncloud' to 'OC\Log\File'. - Renamed the Class for log:file command to File in namespace 'OC\Core\Command\Log\File'. Changed registration of the command to use 'OC\Core\Command\Log\File'. - Changed default Syslog tag to Nextcloud - Retained backwards compatibility for configs with 'logtype' => 'owncloud' - Adjusted tests for the new file log. Closes #490. --- lib/private/Log.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/private/Log.php') diff --git a/lib/private/Log.php b/lib/private/Log.php index 59233cf5c12..2d06e62f54c 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -103,7 +103,9 @@ 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'); + $this->logger = 'OC\\Log\\'.ucfirst($logType=='owncloud' ? 'file' : $logType); call_user_func(array($this->logger, 'init')); } else { $this->logger = $logger; -- cgit v1.2.3