forked from mirror/logrus
Error is not a special case anymore
This commit is contained in:
parent
5f89343f84
commit
b019ab48c5
|
@ -169,14 +169,8 @@ func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interf
|
|||
}
|
||||
|
||||
func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) {
|
||||
var stringVal string
|
||||
|
||||
switch value := value.(type) {
|
||||
case string:
|
||||
stringVal = value
|
||||
case error:
|
||||
stringVal = value.Error()
|
||||
default:
|
||||
stringVal, ok := value.(string)
|
||||
if !ok {
|
||||
stringVal = fmt.Sprint(value)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue