From 52223ba1e85bcffb82f9a63139d62b981d252c68 Mon Sep 17 00:00:00 2001 From: blaerf Date: Wed, 17 Dec 2025 15:50:05 +0100 Subject: [PATCH] Log-Viewer aktualisiert --- app/Services/Logging/LogViewerService.php | 10 ++++++++-- public/views/logs.php | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/Services/Logging/LogViewerService.php b/app/Services/Logging/LogViewerService.php index 28486d7..993cda6 100644 --- a/app/Services/Logging/LogViewerService.php +++ b/app/Services/Logging/LogViewerService.php @@ -142,7 +142,13 @@ class LogViewerService $haystack = $parsed['raw'] . ' ' . $parsed['message']; if (is_array($parsed['context'])) { - $haystack .= ' ' . (string)json_encode($parsed['context'], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); + $json = json_encode( + $parsed['context'], + JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR + ); + if ($json !== false) { + $haystack .= ' ' . $json; + } } if (mb_stripos($haystack, $search) === false) { @@ -282,7 +288,7 @@ class LogViewerService $context = null; // Basis: [timestamp] LEVEL ... - if (preg_match('/^\[(?[0-9\-:\s]{19})\]\s+(?[A-Z]+)\s+(?.*)$/', $line, $m) === 1) { + if (preg_match('/^\[(?[0-9\-:\s]{19})]\s+(?[A-Za-z]+)\s+(?.*)$/', $line, $m) === 1) { $ts = (string)$m['ts']; $level = (string)$m['lvl']; $rest = (string)$m['rest']; diff --git a/public/views/logs.php b/public/views/logs.php index 9c235d0..92d7fee 100644 --- a/public/views/logs.php +++ b/public/views/logs.php @@ -109,7 +109,7 @@ declare(strict_types=1);
Keine Einträge gefunden.
- +
@@ -144,7 +144,7 @@ declare(strict_types=1);
Zeit -
+