From: Bernhard Posselt Date: Fri, 2 Aug 2013 11:34:20 +0000 (+0200) Subject: make log date configurable, default to iso 8601 X-Git-Tag: v6.0.0alpha2~356^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f5c3a346b00b7c8e4926b898f6e6ade86de74c73;p=nextcloud-server.git make log date configurable, default to iso 8601 --- diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php index 7a11a588330..e7246726d40 100644 --- a/lib/log/owncloud.php +++ b/lib/log/owncloud.php @@ -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) {