aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-08-02 13:34:20 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-08-02 13:34:20 +0200
commitf5c3a346b00b7c8e4926b898f6e6ade86de74c73 (patch)
treebca42a2df57f4e2ce5c91f6efe27c4ca6d32b6bb
parent895d9ba1b9529f0ef7dbb47402324f2f8436fcdb (diff)
downloadnextcloud-server-f5c3a346b00b7c8e4926b898f6e6ade86de74c73.tar.gz
nextcloud-server-f5c3a346b00b7c8e4926b898f6e6ade86de74c73.zip
make log date configurable, default to iso 8601
-rw-r--r--lib/log/owncloud.php4
1 files changed, 3 insertions, 1 deletions
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) {