Skip to content

Commit f09e7ba

Browse files
authored
fix: The log is not processed correctly when it consists of multiple lines. (#1721)
Co-authored-by: uniho <[email protected]>
1 parent 30105e7 commit f09e7ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataCollector/LogsCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected function tailFile($file, $lines)
100100
*/
101101
public function getLogs($file)
102102
{
103-
$pattern = "/\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\].*/";
103+
$pattern = "/\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\](?:(?!\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\])[\s\S])*/";
104104

105105
$log_levels = $this->getLevels();
106106

0 commit comments

Comments
 (0)