From f0a4c130f66adad4b2de090affdfb554614aeee1 Mon Sep 17 00:00:00 2001 From: shaojie <77822649+shaojie-dot@users.noreply.github.com> Date: Sat, 23 Jan 2021 08:06:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=E6=97=A5=E5=BF=97=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E6=9B=B4=E6=94=B9=20(#539)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/agent/stra/log.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/agent/stra/log.go b/src/modules/agent/stra/log.go index 2a5597f3..516eda5b 100644 --- a/src/modules/agent/stra/log.go +++ b/src/modules/agent/stra/log.go @@ -269,6 +269,9 @@ func GetPatAndTimeFormat(tf string) (string, string) { case "dd/mm/yyyy:HH:MM:SS": pat = `([012][0-9]|3[01])/(0[1-9]|1[012])/(2[0-9]{3}):([01][0-9]|2[0-4])(:[012345][0-9]){2}` timeFormat = "02/01/2006:15:04:05" + case "mm-dd HH:MM:SS": + pat = `(0[1-9]|1[012])-([012][0-9]|3[01])\s([01][0-9]|2[0-4])(:[012345][0-9]){2}` + timeFormat = "01-02 15:04:05" default: logger.Errorf("match time pac failed : [timeFormat:%s]", tf) return "", ""