Browse Source
logging: Colorize output in all cases of stdout/stderr
master
Matthew Holt
5 years ago
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5
1 changed files with
2 additions and
1 deletions
-
logging.go
|
|
@ -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
|
|
|
|
var colorize bool |
|
|
|
switch cl.writerOpener.(type) { |
|
|
|
case *StdoutWriter, *StderrWriter: |
|
|
|
case StdoutWriter, StderrWriter, |
|
|
|
*StdoutWriter, *StderrWriter: |
|
|
|
colorize = true |
|
|
|
} |
|
|
|
cl.encoder = newDefaultProductionLogEncoder(colorize) |
|
|
|