Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update LogViewer.php
support microtime
  • Loading branch information
im-bravo authored Dec 25, 2018
commit 7a74ff39e7cd1e0b8b0eec43bd8707ca3c797a05
4 changes: 2 additions & 2 deletions src/LogViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ protected function renderTableRow($log)
*/
protected function parseLog($raw)
{
$logs = preg_split('/\[(\d{4}(?:-\d{2}){2} \d{2}(?::\d{2}){2})\] (\w+)\.(\w+):((?:(?!{"exception").)*)?/', trim($raw), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

$logs = preg_split('/\[(\d{4}(?:-\d{2}){2} \d{2}(?::\d{2}){2}\.\d+|\d{4}(?:-\d{2}){2} \d{2}(?::\d{2}){2})\] (\w+)\.(\w+):((?:(?!{"exception").)*)?/', trim($raw), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
foreach ($logs as $index => $log) {
if (preg_match('/^\d{4}/', $log)) {
break;
Expand Down