Commit 522e1ed7
522e1ed7686aMerged
Dmitriy Zhilyaev <[email protected]> ยท 4 years ago ยท 1 file ยท ~1 modified
Description
Merge pull request #282 from helmwave/disable-emoji-with-color
feat: disable emoji with color
Details
- Commit
- 522e1ed7686a
- Parent
- 34691c289ad0
- Merge parent
- b47de143aedf
pkg/log/log.gomodifiedView file
@@ -121,7 +121,12 @@
121121
cfg := &formatter.Config{122122
Color: l.color,123123
}124-
if l.timestamps {124+
125+
if !l.color && l.timestamps { // nolint:gocritic126+
cfg.LogFormat = "[%time%] [%lvl%]: %msg%"127+
} else if !l.color {128+
cfg.LogFormat = "[%lvl%]: %msg%"129+
} else if l.timestamps {125130
cfg.LogFormat = "[%time%] [%emoji% aka %lvl%]: %msg%"126131
}127132