Improve logging of presence sending failures
This commit is contained in:
parent
503e3e0b62
commit
ae2470dcb7
|
@ -2,7 +2,6 @@ package gateway
|
|||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"dev.narayana.im/narayana/telegabber/xmpp/extensions"
|
||||
|
||||
|
@ -61,9 +60,7 @@ func SendMessage(to string, from string, body string, component *xmpp.Component)
|
|||
|
||||
// LogBadPresence verbosely logs a presence
|
||||
func LogBadPresence(err error, presence *stanza.Presence) {
|
||||
log.WithFields(log.Fields{
|
||||
"presence": *presence,
|
||||
}).Error(errors.Wrap(err, "Couldn't send presence"))
|
||||
log.Errorf("Couldn't send presence: %v: %#v", err, presence)
|
||||
}
|
||||
|
||||
// SPFrom is a Telegram user id
|
||||
|
|
Loading…
Reference in a new issue