fix(logging): enable colored logging EE-5512 (#10097)

pull/10182/head
andres-portainer 1 year ago committed by GitHub
parent 7125ef81f3
commit be85d34c4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -39,9 +39,9 @@ func setLoggingMode(mode string) {
case "PRETTY":
log.Logger = log.Output(zerolog.ConsoleWriter{
Out: os.Stderr,
NoColor: true,
TimeFormat: "2006/01/02 03:04PM",
FormatMessage: formatMessage})
FormatMessage: formatMessage,
})
case "JSON":
log.Logger = log.Output(os.Stderr)
}
@ -51,5 +51,6 @@ func formatMessage(i interface{}) string {
if i == nil {
return ""
}
return fmt.Sprintf("%s |", i)
}

Loading…
Cancel
Save