-
Notifications
You must be signed in to change notification settings - Fork 32
Parser Edge Case #8
Copy link
Copy link
Open
Description
The following line is not parsed properly:
[2017-05-31 14:16:19] testing.WARNING: DB - Query to get user_id for inactive login; logging only username in the table [] {"file":"/home/pawel/project/app/Http/Controllers/Auth/LoginController.php","line":108,"class":"App\\Http\\Controllers\\Auth\\LoginController","function":"check"}
The following code was used to test:
// where 'sample_log.log' contains the log statement above'
$reader = new LogReader('sample_log.log');
foreach ($reader as $logLine) {
var_dump($logLine);
}
Resulting parsing:
array(6) {
'date' =>
class DateTime#54 (3) {
public $date =>
string(26) "2017-05-31 14:16:19.000000"
public $timezone_type =>
int(3)
public $timezone =>
string(16) "America/New_York"
}
'logger' =>
string(7) "testing"
'level' =>
string(7) "WARNING"
'message' =>
string(70) "DB - Query to get user_id for inactive login; logging only username in"
'context' =>
NULL
'extra' =>
NULL
}
By inspecting the log statement above manually it is obvious that the 'message' was cut off and there does exist an 'extra' array with attributes but was not parsed either.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels