mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +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 (
|
var (
|
||||||
ansiColorRe = regexp.MustCompile("(?s)\\033\\[\\d*(;\\d*)*m")
|
ansiColorRe = regexp.MustCompile("(?s)\\033\\[\\d*(;\\d*)*m")
|
||||||
errorRe = regexp.MustCompile("(ERROR|FATAL|WARN)")
|
errorRe = regexp.MustCompile("^(ERROR|FATAL|WARN)")
|
||||||
)
|
)
|
||||||
|
|
||||||
type ansiCleaner struct {
|
type ansiCleaner struct {
|
||||||
|
Reference in New Issue
Block a user