mirror of
https://github.com/LBRYFoundation/tracker.git
synced 2025-08-23 17:47:29 +00:00
pkg/log: add type field for errors
This commit is contained in:
parent
3c23a854c8
commit
e266d218db
1 changed files with 4 additions and 1 deletions
|
@ -50,7 +50,10 @@ type err struct {
|
||||||
|
|
||||||
// LogFields provides Fields for logging.
|
// LogFields provides Fields for logging.
|
||||||
func (e err) LogFields() Fields {
|
func (e err) LogFields() Fields {
|
||||||
return Fields{"error": e.e.Error()}
|
return Fields{
|
||||||
|
"error": e.e.Error(),
|
||||||
|
"type": fmt.Sprintf("%T", e.e),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Err is a wrapper around errors that implements Fielder.
|
// Err is a wrapper around errors that implements Fielder.
|
||||||
|
|
Loading…
Add table
Reference in a new issue