mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
fix(logs): add NOCOLOR option for use when exporting to greylog etc [EE-6696] (#11106)
This commit is contained in:
parent
901549e8dd
commit
cdf9197274
2 changed files with 8 additions and 1 deletions
|
@ -42,6 +42,13 @@ func setLoggingMode(mode string) {
|
|||
TimeFormat: "2006/01/02 03:04PM",
|
||||
FormatMessage: formatMessage,
|
||||
})
|
||||
case "NOCOLOR":
|
||||
log.Logger = log.Output(zerolog.ConsoleWriter{
|
||||
Out: os.Stderr,
|
||||
TimeFormat: "2006/01/02 03:04PM",
|
||||
FormatMessage: formatMessage,
|
||||
NoColor: true,
|
||||
})
|
||||
case "JSON":
|
||||
log.Logger = log.Output(os.Stderr)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue