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

use date and time instead of timestamp

parent 3f7643ef
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,8 @@ 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) {
$entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=>time());
$time = date("Y-m-d H:i:s", time());
$entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=> $time);
$handle = @fopen(self::$logFile, 'a');
if ($handle) {
fwrite($handle, json_encode($entry)."\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment