common/loggers: Improve log color regexp

To avoid coloring WARNING inside log errors.
This commit is contained in:
Bjørn Erik Pedersen 2018-11-01 09:33:32 +01:00
parent b2a676f5f0
commit d3a98325c3
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -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 {