Skip to content
Snippets Groups Projects
Commit f5c3a346 authored by Bernhard Posselt's avatar Bernhard Posselt
Browse files

make log date configurable, default to iso 8601

parent 895d9ba1
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment