Skip to content

Commit 0eb229a

Browse files
authored
feat(os/glog): add default time format 2006-01-02T15:04:05.000Z07:00 (#4134)
1 parent e127682 commit 0eb229a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

os/glog/glog_logger.go

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type Logger struct {
4040

4141
const (
4242
defaultFileFormat = `{Y-m-d}.log`
43+
defaultTimeFormat = "2006-01-02T15:04:05.000Z07:00"
4344
defaultFileFlags = os.O_CREATE | os.O_WRONLY | os.O_APPEND
4445
defaultFilePerm = os.FileMode(0666)
4546
defaultFileExpire = time.Minute

os/glog/glog_logger_config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func DefaultConfig() Config {
5959
c := Config{
6060
File: defaultFileFormat,
6161
Flags: F_TIME_STD,
62-
TimeFormat: "",
62+
TimeFormat: defaultTimeFormat,
6363
Level: LEVEL_ALL,
6464
CtxKeys: []interface{}{},
6565
StStatus: 1,

0 commit comments

Comments
 (0)