From 5ddbd2a04dc1addfdb3befd95566f04ffcd55638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my?= <121813929+JayAnvers@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:22:11 +0200 Subject: [PATCH] Update HttpAccessLog.php Update line parsing regex ; make last elements optional --- src/Logs/HttpAccessLog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Logs/HttpAccessLog.php b/src/Logs/HttpAccessLog.php index 921c1427..ed8bdfea 100644 --- a/src/Logs/HttpAccessLog.php +++ b/src/Logs/HttpAccessLog.php @@ -11,7 +11,7 @@ class HttpAccessLog extends Log { public static string $name = 'HTTP Access'; public static string $levelClass = HttpStatusCodeLevel::class; - public static string $regex = '/(?P\S+) (?P\S+) (?P\S+) \[(?P.+)\] "(?P\S+) (?P\S+) (?P\S+)" (?P\S+) (?P\S+) "(?P[^"]*)" "(?P[^"]*)"/'; + public static string $regex = '/(?P\S+) (?P\S+) (?P\S+) \[(?P.+)\] "(?P\S+) (?P\S+) (?P\S+)"( (?P\S+))?( (?P\S+))?( "(?P[^"]*)")?( "(?P[^"]*)")?/'; public static string $regexLevelKey = 'status_code'; public static array $columns = [ ['label' => 'Datetime', 'data_path' => 'datetime'],