mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
logging: Colorize output in all cases of stdout/stderr
This commit is contained in:
parent
d89ad2fd5b
commit
6e4132eb89
1 changed files with 2 additions and 1 deletions
|
@ -423,7 +423,8 @@ func (cl *CustomLog) provision(ctx Context, logging *Logging) error {
|
||||||
// only allow colorized output if this log is going to stdout or stderr
|
// only allow colorized output if this log is going to stdout or stderr
|
||||||
var colorize bool
|
var colorize bool
|
||||||
switch cl.writerOpener.(type) {
|
switch cl.writerOpener.(type) {
|
||||||
case *StdoutWriter, *StderrWriter:
|
case StdoutWriter, StderrWriter,
|
||||||
|
*StdoutWriter, *StderrWriter:
|
||||||
colorize = true
|
colorize = true
|
||||||
}
|
}
|
||||||
cl.encoder = newDefaultProductionLogEncoder(colorize)
|
cl.encoder = newDefaultProductionLogEncoder(colorize)
|
||||||
|
|
Loading…
Reference in a new issue