From 119f566dfad67bc1e4d754302a90a1de37331ad5 Mon Sep 17 00:00:00 2001 From: pxpm Date: Wed, 7 Jan 2026 11:54:14 +0000 Subject: [PATCH] work with logs that dont have the level structure --- src/app/Classes/LogViewer.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/app/Classes/LogViewer.php b/src/app/Classes/LogViewer.php index cd2c0f8..a263cd2 100644 --- a/src/app/Classes/LogViewer.php +++ b/src/app/Classes/LogViewer.php @@ -179,6 +179,25 @@ public static function all() } } + if (empty($log)) { + $lines = preg_split('/\r\n|\r|\n/', $file); + + foreach ($lines as $line) { + if (!empty(trim($line))) { + $log[] = [ + 'context' => null, + 'level' => 'info', + 'level_class' => static::$levels_classes['info'], + 'level_img' => static::$levels_imgs['info'], + 'date' => null, + 'text' => $line, + 'in_file' => null, + 'stack' => '', + ]; + } + } + } + return array_reverse($log); }