Skip to content

Commit

Permalink
feat(log): enable override coloring based on CLICOLOR and CLICOLOR_FO…
Browse files Browse the repository at this point in the history
…RCE (golangci#2657)
  • Loading branch information
ttys3 authored and SeigeC committed Apr 4, 2023
1 parent 1381abe commit d932d6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/logutils/stderr_log.go
Expand Up @@ -38,7 +38,8 @@ func NewStderrLog(name string) *StderrLog {

sl.logger.Out = StdErr
formatter := &logrus.TextFormatter{
DisableTimestamp: true, // `INFO[0007] msg` -> `INFO msg`
DisableTimestamp: true, // `INFO[0007] msg` -> `INFO msg`
EnvironmentOverrideColors: true,
}
if os.Getenv("LOG_TIMESTAMP") == "1" {
formatter.DisableTimestamp = false
Expand Down

0 comments on commit d932d6b

Please sign in to comment.