ipld-eth-beacon-indexer/pkg/loghelper/log_error.go
2022-04-27 14:01:59 -04:00

21 lines
403 B
Go

// A simple function to help with logging errors.
package loghelper
import (
log "github.com/sirupsen/logrus"
)
// A simple helper function that will help wrap the error message.
func LogError(err error) *log.Entry {
return log.WithFields(log.Fields{
"err": err,
})
}
func LogSlotError(slot string, err error) *log.Entry {
return log.WithFields(log.Fields{
"err": err,
"slot": slot,
})
}