Reorder the entries of the log for easier reading

This commit is contained in:
Juan Pablo Villafáñez 2017-04-04 10:12:41 +02:00 committed by Joas Schilling
parent af42ca2025
commit 38e5135cb9
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
2 changed files with 7 additions and 6 deletions

View File

@ -578,7 +578,8 @@ class Request implements \ArrayAccess, \Countable, IRequest {
}
if(empty($this->requestId)) {
$this->requestId = $this->secureRandom->generate(20);
$validChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
$this->requestId = $this->secureRandom->generate(20, $validChars);
}
return $this->requestId;

View File

@ -106,16 +106,16 @@ class File {
$version = $config->getValue('version', '');
$entry = compact(
'reqId',
'remoteAddr',
'app',
'message',
'level',
'time',
'remoteAddr',
'user',
'app',
'method',
'url',
'user',
'message',
'userAgent',
'version'
'version',
);
$entry = json_encode($entry);
$handle = @fopen(self::$logFile, 'a');