Skip to content

Commit

Permalink
Improved JSON detection and extraction.
Browse files Browse the repository at this point in the history
  • Loading branch information
juanparati authored and JuanLeadSupply committed Feb 28, 2019
1 parent 5d6e396 commit e37a742
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App/Model/LogParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function parseLogEntry(
if (preg_match(static::LOG_EXPR, $entry, $matches))
{
// Extract JSON data
if (preg_match('/ (\{.*\})$/', $matches[4], $data))
if (preg_match('/ ({.*})$/', trim($matches[4]), $data))
{
$matches[4] = str_replace($data[1], '', $matches[4]);
$data = $data[1];
Expand Down

0 comments on commit e37a742

Please sign in to comment.