mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
FormatLogfmtValue should escape error and fmt.Stringer values
This commit is contained in:
parent
3b7e759215
commit
cdde508ef1
1 changed files with 2 additions and 2 deletions
|
|
@ -169,9 +169,9 @@ func FormatLogfmtValue(value interface{}, term bool) (result string) {
|
|||
}
|
||||
switch v := value.(type) {
|
||||
case error:
|
||||
return v.Error()
|
||||
return escapeString(v.Error())
|
||||
case fmt.Stringer:
|
||||
return v.String()
|
||||
return escapeString(v.String())
|
||||
case bool:
|
||||
return strconv.FormatBool(v)
|
||||
case float32:
|
||||
|
|
|
|||
Loading…
Reference in a new issue