From 45f5c9ceb27e6ef545f5f58deccb4a5153071563 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 17 Apr 2013 14:05:51 +0200 Subject: [PATCH] fix admin log display and use a more readable format --- lib/log/owncloud.php | 2 +- settings/js/log.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php index 8c593528293..7a11a588330 100644 --- a/lib/log/owncloud.php +++ b/lib/log/owncloud.php @@ -49,7 +49,7 @@ 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("Y-m-d H:i:s", time()); + $time = date("F d, Y H:i:s", time()); $entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=> $time); $handle = @fopen(self::$logFile, 'a'); if ($handle) { diff --git a/settings/js/log.js b/settings/js/log.js index 09b8ec1ab44..bfcfcf0333e 100644 --- a/settings/js/log.js +++ b/settings/js/log.js @@ -46,7 +46,11 @@ OC.Log={ row.append(messageTd); var timeTd=$(''); - timeTd.text(formatDate(entry.time*1000)); + if(isNaN(entry.time)){ + timeTd.text(entry.time); + } else { + timeTd.text(formatDate(entry.time*1000)); + } row.append(timeTd); $('#log').append(row); } -- 2.39.5