]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix admin log display and use a more readable format
authorBernhard Posselt <nukeawhale@gmail.com>
Wed, 17 Apr 2013 12:05:51 +0000 (14:05 +0200)
committerBernhard Posselt <nukeawhale@gmail.com>
Thu, 1 Aug 2013 16:09:18 +0000 (18:09 +0200)
lib/log/owncloud.php
settings/js/log.js

index 8c593528293964e48c0fb92d9e04eef20ba35cb4..7a11a588330c7a79902fda7e82a25a0fcf4aaebe 100644 (file)
@@ -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) {
index 09b8ec1ab4498a9f67e398929918803214a40ee5..bfcfcf0333e436d1a8fec0b5ee128956d298714c 100644 (file)
@@ -46,7 +46,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);
                }