Logging: improve formatting to enable fail2ban parsing
Fixes #436 Modifications: - remove calls to strval() on safe data - update the date format: 'Y/m/d_H:i:s' => 'Y/m/d H:i:s' Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
parent
b7b0894720
commit
35cc3582f0
1 changed files with 1 additions and 1 deletions
|
@ -248,7 +248,7 @@ public static function purgeCache()
|
|||
// Log to text file
|
||||
function logm($message)
|
||||
{
|
||||
$t = strval(date('Y/m/d_H:i:s')).' - '.$_SERVER["REMOTE_ADDR"].' - '.strval($message)."\n";
|
||||
$t = strval(date('Y/m/d H:i:s')).' - '.$_SERVER["REMOTE_ADDR"].' - '.strval($message)."\n";
|
||||
file_put_contents($GLOBALS['config']['DATADIR'].'/log.txt',$t,FILE_APPEND);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue