logging: disable {color} and {color:reset} in console logs when --disable-color is passed (#860)

This commit is contained in:
Jarek Kowalski authored and GitHub committed 2021-03-01 08:40:33 -08:00
1 parent 9620b57e35
commit 95e225ef45
1 file changed
+5
+5
View File
@@ -93,6 +93,11 @@ func setupConsoleBackend() logging.Backend {
maybeTimestamp = "%{time:15:04:05.000} "
)
if *disableColor {
prefix = ""
suffix = "%{message}"
}
if !*consoleLogTimestamps {
maybeTimestamp = ""
}