Merge pull request #1185 from CreativeCactus/patch-1

Replace %v with %w for error
This commit is contained in:
David Bariod
2020-12-17 16:44:23 +01:00
committed by GitHub
+1 -1
View File
@@ -402,7 +402,7 @@ func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) {
// source of the official loggers.
serialized, err := json.Marshal(entry.Data)
if err != nil {
return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
return nil, fmt.Errorf("Failed to marshal fields to JSON, %w", err)
}
return append(serialized, '\n'), nil
}