make log date configurable, default to iso 8601

remotes/origin/stable6
Bernhard Posselt 2013-08-02 13:34:20 +07:00
parent 895d9ba1b9
commit f5c3a346b0
1 changed files with 3 additions and 1 deletions

@ -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) {