]> source.dussan.org Git - nextcloud-server.git/commitdiff
make log date configurable, default to iso 8601
authorBernhard Posselt <nukeawhale@gmail.com>
Fri, 2 Aug 2013 11:34:20 +0000 (13:34 +0200)
committerBernhard Posselt <nukeawhale@gmail.com>
Fri, 2 Aug 2013 11:34:20 +0000 (13:34 +0200)
lib/log/owncloud.php

index 7a11a588330c7a79902fda7e82a25a0fcf4aaebe..e7246726d40b866d436f970d19cc9b0044917ecb 100644 (file)
@@ -49,7 +49,9 @@ class OC_Log_Owncloud {
        public static function write($app, $message, $level) {
                $minLevel=min(OC_Config::getValue( "loglevel", OC_Log::WARN ), OC_Log::ERROR);
                if($level>=$minLevel) {
-                       $time = date("F d, Y H:i:s", time());
+                       // default to ISO8601
+                       $format = OC_Config::getValue('logdateformat', 'c');
+                       $time = date($format, time());
                        $entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=> $time);
                        $handle = @fopen(self::$logFile, 'a');
                        if ($handle) {