mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
make log date configurable, default to iso 8601
This commit is contained in:
parent
895d9ba1b9
commit
f5c3a346b0
1 changed files with 3 additions and 1 deletions
|
|
@ -49,7 +49,9 @@ 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("F d, Y H:i:s", time());
|
||||
// default to ISO8601
|
||||
$format = OC_Config::getValue('logdateformat', 'c');
|
||||
$time = date($format, time());
|
||||
$entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=> $time);
|
||||
$handle = @fopen(self::$logFile, 'a');
|
||||
if ($handle) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue