mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
telegramnotifier: fix err check
This commit is contained in:
parent
2b953ad2d1
commit
731e5569d0
|
@ -34,7 +34,7 @@ func (t *LogHook) Fire(e *logrus.Entry) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
var message = fmt.Sprintf("[%s] %s", e.Level.String(), e.Message)
|
var message = fmt.Sprintf("[%s] %s", e.Level.String(), e.Message)
|
||||||
if errData, ok := e.Data[logrus.ErrorKey]; ok {
|
if errData, ok := e.Data[logrus.ErrorKey]; ok && errData != nil {
|
||||||
if err, isErr := errData.(error); isErr {
|
if err, isErr := errData.(error); isErr {
|
||||||
message += " Error: " + err.Error()
|
message += " Error: " + err.Error()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user