mirror of https://github.com/sirupsen/logrus.git
Merge pull request #1185 from CreativeCactus/patch-1
Replace %v with %w for error
This commit is contained in:
commit
44d983dbc2
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue