From af9a94f25f6d1a23a5b95e1f4c9bd4b9d2d64426 Mon Sep 17 00:00:00 2001 From: Marcel Ludwig Date: Wed, 7 Apr 2021 16:07:08 +0200 Subject: [PATCH] Add dashes to color regex --- logging/json_color_formatter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging/json_color_formatter.go b/logging/json_color_formatter.go index c44d37abe..ab3607773 100644 --- a/logging/json_color_formatter.go +++ b/logging/json_color_formatter.go @@ -24,7 +24,7 @@ func NewJSONColorFormatter(parent string, pretty bool) logrus.Formatter { } } -var keyRegex = regexp.MustCompile(`"(\w+)":`) +var keyRegex = regexp.MustCompile(`"([A-Za-z0-9-_]+)":`) func (jcf *JSONColorFormatter) Format(entry *logrus.Entry) ([]byte, error) { b, err := jcf.inner.Format(entry)