From 34fd7e3df4ccce4ba92b53540685d0dfb6f0d75c Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 2 Aug 2013 13:34:20 +0200 Subject: [PATCH] make log date configurable, default to iso 8601 --- lib/log/owncloud.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.39.5