mirror of
https://github.com/kopia/kopia.git
synced 2026-10-27 00:28:47 -04:00
logging: disable {color} and {color:reset} in console logs when --disable-color is passed (#860)
This commit is contained in:
1 parent
9620b57e35
commit
95e225ef45
1 file changed
+5
@@ -93,6 +93,11 @@ func setupConsoleBackend() logging.Backend {
|
||||
maybeTimestamp = "%{time:15:04:05.000} "
|
||||
)
|
||||
|
||||
if *disableColor {
|
||||
prefix = ""
|
||||
suffix = "%{message}"
|
||||
}
|
||||
|
||||
if !*consoleLogTimestamps {
|
||||
maybeTimestamp = ""
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user