1
0
mirror of https://github.com/rs/zerolog synced 2026-06-08 17:13:30 +00:00

Use everywhere InterfaceMarshalFunc (#414)

This commit is contained in:
Mitar
2022-07-16 13:03:29 -07:00
committed by GitHub
parent b30730fab2
commit dbdec88d16
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ func (w ConsoleWriter) writeFields(evt map[string]interface{}, buf *bytes.Buffer
case json.Number:
buf.WriteString(fv(fValue))
default:
b, err := json.Marshal(fValue)
b, err := InterfaceMarshalFunc(fValue)
if err != nil {
fmt.Fprintf(buf, colorize("[error: %v]", colorRed, w.NoColor), err)
} else {
+1 -1
View File
@@ -102,7 +102,7 @@ func (w journalWriter) Write(p []byte) (n int, err error) {
case json.Number:
args[jKey] = fmt.Sprint(value)
default:
b, err := json.Marshal(value)
b, err := zerolog.InterfaceMarshalFunc(value)
if err != nil {
args[jKey] = fmt.Sprintf("[error: %v]", err)
} else {