forked from mirror/logrus
Fix error formatting based on best practices from Code Review Comments
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
This commit is contained in:
parent
4ea4861398
commit
774bb8e43f
|
@ -98,7 +98,7 @@ func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
|
||||||
encoder.SetIndent("", " ")
|
encoder.SetIndent("", " ")
|
||||||
}
|
}
|
||||||
if err := encoder.Encode(data); err != nil {
|
if err := encoder.Encode(data); err != nil {
|
||||||
return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
|
return nil, fmt.Errorf("failed to marshal fields to JSON, %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return b.Bytes(), nil
|
return b.Bytes(), nil
|
||||||
|
|
Loading…
Reference in New Issue