diff --git a/internal/version/VERSION b/internal/version/VERSION index b7fffde9..3c60993c 100644 --- a/internal/version/VERSION +++ b/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-250812 +v5.0.0-250813 diff --git a/logger.go b/logger.go index 3d3bcd11..ea7e01ce 100644 --- a/logger.go +++ b/logger.go @@ -18,7 +18,11 @@ func InitLogger(logLevel string, logJSON bool, logFile bool) { // Error Logging with Stacktrace zerolog.ErrorStackMarshaler = pkgerrors.MarshalStack - // set log timestamp precise to milliseconds + // set log timestamp precise to milliseconds with Beijing timezone (UTC+8) + beijingLoc, _ := time.LoadLocation("Asia/Shanghai") + zerolog.TimestampFunc = func() time.Time { + return time.Now().In(beijingLoc) + } zerolog.TimeFieldFormat = "2006-01-02T15:04:05.999Z0700" // init log writers