Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(log): enable override coloring based on CLICOLOR and CLICOLOR_FORCE
  • Loading branch information
ttys3 committed Mar 19, 2022
commit 0f756af95ab55ad561890b849573454ece104bf1
3 changes: 2 additions & 1 deletion pkg/logutils/stderr_log.go
Original file line number Diff line number Diff line change
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