Skip to content

Commit cfddfb3

Browse files
authored
fix: add color for error inside of log message (#6493)
1 parent dfcb0f9 commit cfddfb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/log/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func (h *ColorHandler) appendAttr(buf []byte, a slog.Attr, groups []string) []by
129129
buf = append(buf, key...)
130130
buf = append(buf, '=')
131131
if err, ok := a.Value.Any().(error); ok {
132-
buf = strconv.AppendQuote(buf, color.HiRedString(err.Error()))
132+
buf = append(buf, color.HiRedString(strconv.Quote(err.Error()))...)
133133
} else {
134134
buf = append(buf, a.Value.String()...)
135135
}

0 commit comments

Comments
 (0)