Skip to content

Commit

Permalink
common/loggers: Improve log color regexp
Browse files Browse the repository at this point in the history
To avoid coloring WARNING inside log errors.
  • Loading branch information
bep committed Nov 1, 2018
1 parent b2a676f commit d3a9832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/loggers/loggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func NewErrorLogger() *Logger {

var (
ansiColorRe = regexp.MustCompile("(?s)\\033\\[\\d*(;\\d*)*m")
errorRe = regexp.MustCompile("(ERROR|FATAL|WARN)")
errorRe = regexp.MustCompile("^(ERROR|FATAL|WARN)")
)

type ansiCleaner struct {
Expand Down

0 comments on commit d3a9832

Please sign in to comment.