21 lines
403 B
Go
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,
|
|
})
|
|
}
|