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:
VirtualTam 2016-01-16 16:16:56 +01:00 committed by Knah Tsaeb
parent b7b0894720
commit 35cc3582f0
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ class pageCache
// 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);
}