Skip to content

Commit

Permalink
Add dashes to color regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Ludwig committed Apr 7, 2021
1 parent 47961d5 commit af9a94f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logging/json_color_formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit af9a94f

Please sign in to comment.