chore: refactor logx file time format (#4335)

This commit is contained in:
Kevin Wan 2024-08-27 22:01:01 +08:00 committed by GitHub
parent 075817a8dd
commit 896e1a2abb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View File

@ -856,6 +856,7 @@ func testSetLevelTwiceWithMode(t *testing.T, mode string, w *mockWriter) {
Encoding: plainEncoding,
Stat: false,
TimeFormat: time.RFC3339,
FileTimeFormat: time.DateTime,
})
SetUp(LogConf{
Mode: mode,

View File

@ -30,6 +30,7 @@ const (
var (
// ErrLogFileClosed is an error that indicates the log file is already closed.
ErrLogFileClosed = errors.New("error: log file closed")
fileTimeFormat = time.RFC3339
)