From bf1bd3ef5a798775526b7582aef636236b10331c Mon Sep 17 00:00:00 2001 From: HONG YANG Date: Wed, 10 Mar 2021 17:36:58 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=9Cmassage=E2=80=9D=20(#603)?= 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 516eda5b..c4d5f821 100644 --- a/src/modules/agent/stra/log.go +++ b/src/modules/agent/stra/log.go @@ -257,6 +257,9 @@ func GetPatAndTimeFormat(tf string) (string, string) { case "yyyy/mm/dd HH:MM:SS": pat = `(2[0-9]{3})/(0[1-9]|1[012])/([012][0-9]|3[01])\s([01][0-9]|2[0-4])(:[012345][0-9]){2}` timeFormat = "2006/01/02 15:04:05" + case "yyyy/mm/dd - HH:MM:SS": + pat = `(2[0-9]{3})/(0[1-9]|1[012])/([012][0-9]|3[01])\s-\s([01][0-9]|2[0-4])(:[012345][0-9]){2}` + timeFormat = "2006/01/02 - 15:04:05" case "yyyymmdd HH:MM:SS": pat = `(2[0-9]{3})(0[1-9]|1[012])([012][0-9]|3[01])\s([01][0-9]|2[0-4])(:[012345][0-9]){2}` timeFormat = "20060102 15:04:05"