diff options
author | bodqhrohro <bodqhrohro@gmail.com> | 2019-12-09 03:57:49 +0300 |
---|---|---|
committer | bodqhrohro <bodqhrohro@gmail.com> | 2019-12-09 03:57:49 +0300 |
commit | ae2470dcb70c302bd3fbcd53ffa7384f526435bd (patch) | |
tree | 3a0f3dc6603cba4b08fb35111c7ecdf323cc6b18 /xmpp/gateway | |
parent | 503e3e0b628ee4cac1bbb6c72fbefe6e07466656 (diff) |
Improve logging of presence sending failures
Diffstat (limited to 'xmpp/gateway')
-rw-r--r-- | xmpp/gateway/gateway.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/xmpp/gateway/gateway.go b/xmpp/gateway/gateway.go index be1f6a3..8629698 100644 --- a/xmpp/gateway/gateway.go +++ b/xmpp/gateway/gateway.go @@ -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 |