Skip to content

Commit

Permalink
Merge pull request #31 from JackieDo/version-2.x
Browse files Browse the repository at this point in the history
Update LogParser.php
  • Loading branch information
JackieDo authored Apr 8, 2020
2 parents 8295c49 + a7151f1 commit 9acf462
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Jackiedo/LogReader/LogParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ public function parseLogContext($content)

preg_match($pattern, $content, $matchs);

$exception = isset($matchs[1]) ? $matchs[1] : null;
$message = isset($matchs[2]) ? $matchs[3] : $content;
$in = isset($matchs[4]) ? $matchs[4] : null;
$line = isset($matchs[5]) ? $matchs[5] : null;
$exception = isset($matchs[1]) ? $matchs[3] : null;
$message = isset($matchs[6]) ? $matchs[6] : $content;
$message = trim($message, "'");
$in = isset($matchs[7]) ? $matchs[7] : null;
$line = isset($matchs[8]) ? $matchs[8] : null;

return compact('message', 'exception', 'in', 'line');
}
Expand Down

0 comments on commit 9acf462

Please sign in to comment.