Skip to content

Commit

Permalink
Use everywhere InterfaceMarshalFunc
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Feb 19, 2022
1 parent fc26014 commit 204bdb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion console.go
Expand Up @@ -206,7 +206,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 {
Expand Down
2 changes: 1 addition & 1 deletion journald/journald.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 204bdb5

Please sign in to comment.