mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 10:44:41 -04:00
common/loggers: Improve log color regexp
To avoid coloring WARNING inside log errors.
This commit is contained in:
parent
b2a676f5f0
commit
d3a98325c3
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user