summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-17 14:05:51 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-17 14:05:51 +0200
commitf7e29eabf29e4bda052ad170df1955fce0ad37ee (patch)
treeeb6dc367c9a22cbc0d7b0cbd7cc31f68f6da05a8
parent8471340db9a5d33fb2d77974ad3852cd52f016e5 (diff)
downloadnextcloud-server-f7e29eabf29e4bda052ad170df1955fce0ad37ee.tar.gz
nextcloud-server-f7e29eabf29e4bda052ad170df1955fce0ad37ee.zip
fix admin log display and use a more readable format
-rw-r--r--lib/log/owncloud.php2
-rw-r--r--settings/js/log.js6
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 81117f9e827..84f6d1aa5f3 100644
--- a/settings/js/log.js
+++ b/settings/js/log.js
@@ -55,7 +55,11 @@ OC.Log={
row.append(messageTd);
var timeTd=$('<td/>');
- 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);
}