Skip to content

Commit

Permalink
Merge pull request #41 from opcodesio/bug/last-log-not-displayed
Browse files Browse the repository at this point in the history
fix the last log not being indexed and displayed
  • Loading branch information
arukompas authored Aug 31, 2022
2 parents e664872 + b66888a commit f8f1540
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opcodesio/log-viewer",
"version": "v1.2.2",
"version": "v1.2.3",
"description": "Fast and easy-to-use log viewer for your Laravel application",
"keywords": [
"arukompas",
Expand Down
2 changes: 1 addition & 1 deletion src/LogReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ public function scan(bool $force = false): self
$currentLog .= $line;
}

if ($currentLog !== '' && preg_match(self::LOG_MATCH_PATTERN, $line) === 1) {
if ($currentLog !== '' && preg_match(self::LOG_MATCH_PATTERN, $currentLog) === 1) {
if ((is_null($this->query) || preg_match($this->query, $currentLog))) {
$this->indexLogPosition($this->nextLogIndex, $currentLogLevel, $currentLogPosition);
}
Expand Down

0 comments on commit f8f1540

Please sign in to comment.