From 8dd787ea06e064b15390d41a8e18629c024bc95d Mon Sep 17 00:00:00 2001 From: gz0119 Date: Wed, 6 Aug 2025 14:24:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dsyslog=E5=B8=A6=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=97=B6=E8=BD=AC=E6=8D=A2=E5=BC=82=E5=B8=B8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/syslog/syslog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/syslog/syslog.go b/ios/syslog/syslog.go index 26216ac8..d6d3d766 100644 --- a/ios/syslog/syslog.go +++ b/ios/syslog/syslog.go @@ -77,7 +77,7 @@ type LogEntry struct { } func Parser() func(log string) (*LogEntry, error) { - pattern := `(?P[A-Z][a-z]{2} \d{1,2} \d{2}:\d{2}:\d{2}) (?P\S+) (?P[^\[]+)\[(?P\d+)\] <(?P\w+)>: (?P.+)` + pattern := `(?P[A-Z][a-z]{2}\s+\d+\s+\d{2}:\d{2}:\d{2})\s+(?P\S+)\s+(?P[^\[]+)\[(?P\d+)\]\s+<(?P\w+)>: (?P.+)` regexp := regexp.MustCompile(pattern) return func(log string) (*LogEntry, error) {