diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-04 15:18:05 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-04 15:18:05 -0700 |
commit | d1a39ab01ca071aa762c83b0e642c21996ff45e8 (patch) | |
tree | 5c474b1ec5822ab992dcac5c0a880bba420008b6 /lib | |
parent | b5f18111f4897cfb4c9dfb517bc6b80ce2b6a8ac (diff) | |
parent | 33d78ab9c719ac0677651cfe76bf6a2aa3073241 (diff) | |
download | nextcloud-server-d1a39ab01ca071aa762c83b0e642c21996ff45e8.tar.gz nextcloud-server-d1a39ab01ca071aa762c83b0e642c21996ff45e8.zip |
Merge pull request #4293 from owncloud/config-date
make log date configurable, default to iso 8601
Diffstat (limited to 'lib')
-rw-r--r-- | lib/log/owncloud.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php index 7a11a588330..d16b9537a16 100644 --- a/lib/log/owncloud.php +++ b/lib/log/owncloud.php @@ -44,12 +44,14 @@ 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); 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) { @@ -61,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) { |