mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 05:15:25 +02:00
fix(logging): enable colored logging EE-5512 (#10097)
This commit is contained in:
parent
7125ef81f3
commit
be85d34c4b
1 changed files with 3 additions and 2 deletions
|
@ -39,9 +39,9 @@ func setLoggingMode(mode string) {
|
||||||
case "PRETTY":
|
case "PRETTY":
|
||||||
log.Logger = log.Output(zerolog.ConsoleWriter{
|
log.Logger = log.Output(zerolog.ConsoleWriter{
|
||||||
Out: os.Stderr,
|
Out: os.Stderr,
|
||||||
NoColor: true,
|
|
||||||
TimeFormat: "2006/01/02 03:04PM",
|
TimeFormat: "2006/01/02 03:04PM",
|
||||||
FormatMessage: formatMessage})
|
FormatMessage: formatMessage,
|
||||||
|
})
|
||||||
case "JSON":
|
case "JSON":
|
||||||
log.Logger = log.Output(os.Stderr)
|
log.Logger = log.Output(os.Stderr)
|
||||||
}
|
}
|
||||||
|
@ -51,5 +51,6 @@ func formatMessage(i interface{}) string {
|
||||||
if i == nil {
|
if i == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf("%s |", i)
|
return fmt.Sprintf("%s |", i)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue