Skip to content

Commit

Permalink
fix: add color for error inside of log message (#6493)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Apr 15, 2024
1 parent dfcb0f9 commit cfddfb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/log/handler.go
Expand Up @@ -129,7 +129,7 @@ func (h *ColorHandler) appendAttr(buf []byte, a slog.Attr, groups []string) []by
buf = append(buf, key...)
buf = append(buf, '=')
if err, ok := a.Value.Any().(error); ok {
buf = strconv.AppendQuote(buf, color.HiRedString(err.Error()))
buf = append(buf, color.HiRedString(strconv.Quote(err.Error()))...)
} else {
buf = append(buf, a.Value.String()...)
}
Expand Down

0 comments on commit cfddfb3

Please sign in to comment.