From f5c3a346b00b7c8e4926b898f6e6ade86de74c73 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 2 Aug 2013 13:34:20 +0200 Subject: make log date configurable, default to iso 8601 --- lib/log/owncloud.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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) { -- cgit v1.2.3 From 33d78ab9c719ac0677651cfe76bf6a2aa3073241 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Sun, 4 Aug 2013 23:13:34 +0200 Subject: fixing PHPDoc --- lib/log/owncloud.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php index e7246726d40..d16b9537a16 100644 --- a/lib/log/owncloud.php +++ b/lib/log/owncloud.php @@ -44,7 +44,7 @@ class OC_Log_Owncloud { * write a message in the log * @param string $app * @param string $message - * @param int level + * @param int $level */ public static function write($app, $message, $level) { $minLevel=min(OC_Config::getValue( "loglevel", OC_Log::WARN ), OC_Log::ERROR); @@ -63,8 +63,8 @@ class OC_Log_Owncloud { /** * get entries from the log in reverse chronological order - * @param int limit - * @param int offset + * @param int $limit + * @param int $offset * @return array */ public static function getEntries($limit=50, $offset=0) { -- cgit v1.2.3