diff --git a/log/json_logger.go b/log/json_logger.go index 231e09955..66094b4dd 100644 --- a/log/json_logger.go +++ b/log/json_logger.go @@ -44,9 +44,6 @@ func merge(dst map[string]interface{}, k, v interface{}) { default: key = fmt.Sprint(x) } - if x, ok := v.(error); ok { - v = safeError(x) - } // We want json.Marshaler and encoding.TextMarshaller to take priority over // err.Error() and v.String(). But json.Marshall (called later) does that by diff --git a/log/json_logger_test.go b/log/json_logger_test.go index 00e691005..e3e309090 100644 --- a/log/json_logger_test.go +++ b/log/json_logger_test.go @@ -88,6 +88,10 @@ func (aller) String() string { return "string" } +func (aller) Error() string { + return "error" +} + // textstringer implements encoding.TextMarshaler and fmt.Stringer. type textstringer struct{}