mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 09:00:20 +08:00
chore: refactor logx file time format (#4335)
This commit is contained in:
parent
075817a8dd
commit
896e1a2abb
@ -850,12 +850,13 @@ func doTestStructedLogConsole(t *testing.T, w *mockWriter, write func(...any)) {
|
|||||||
func testSetLevelTwiceWithMode(t *testing.T, mode string, w *mockWriter) {
|
func testSetLevelTwiceWithMode(t *testing.T, mode string, w *mockWriter) {
|
||||||
writer.Store(nil)
|
writer.Store(nil)
|
||||||
SetUp(LogConf{
|
SetUp(LogConf{
|
||||||
Mode: mode,
|
Mode: mode,
|
||||||
Level: "debug",
|
Level: "debug",
|
||||||
Path: "/dev/null",
|
Path: "/dev/null",
|
||||||
Encoding: plainEncoding,
|
Encoding: plainEncoding,
|
||||||
Stat: false,
|
Stat: false,
|
||||||
TimeFormat: time.RFC3339,
|
TimeFormat: time.RFC3339,
|
||||||
|
FileTimeFormat: time.DateTime,
|
||||||
})
|
})
|
||||||
SetUp(LogConf{
|
SetUp(LogConf{
|
||||||
Mode: mode,
|
Mode: mode,
|
||||||
|
@ -30,7 +30,8 @@ const (
|
|||||||
var (
|
var (
|
||||||
// ErrLogFileClosed is an error that indicates the log file is already closed.
|
// ErrLogFileClosed is an error that indicates the log file is already closed.
|
||||||
ErrLogFileClosed = errors.New("error: log file closed")
|
ErrLogFileClosed = errors.New("error: log file closed")
|
||||||
fileTimeFormat = time.RFC3339
|
|
||||||
|
fileTimeFormat = time.RFC3339
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
Loading…
Reference in New Issue
Block a user