fix admin log display and use a more readable format

This commit is contained in:
Bernhard Posselt 2013-04-17 14:05:51 +02:00
parent 8471340db9
commit f7e29eabf2
2 changed files with 6 additions and 2 deletions

View File

@ -49,7 +49,7 @@ class OC_Log_Owncloud {
public static function write($app, $message, $level) { public static function write($app, $message, $level) {
$minLevel=min(OC_Config::getValue( "loglevel", OC_Log::WARN ), OC_Log::ERROR); $minLevel=min(OC_Config::getValue( "loglevel", OC_Log::WARN ), OC_Log::ERROR);
if($level>=$minLevel) { 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); $entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=> $time);
$handle = @fopen(self::$logFile, 'a'); $handle = @fopen(self::$logFile, 'a');
if ($handle) { if ($handle) {

View File

@ -55,7 +55,11 @@ OC.Log={
row.append(messageTd); row.append(messageTd);
var timeTd=$('<td/>'); var timeTd=$('<td/>');
if(isNaN(entry.time)){
timeTd.text(entry.time);
} else {
timeTd.text(formatDate(entry.time*1000)); timeTd.text(formatDate(entry.time*1000));
}
row.append(timeTd); row.append(timeTd);
$('#log').append(row); $('#log').append(row);
} }