mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
common/loggers: Improve log color regexp
To avoid coloring WARNING inside log errors.
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user