aboutsummaryrefslogtreecommitdiff
path: root/xmpp/gateway
diff options
context:
space:
mode:
authorbodqhrohro <bodqhrohro@gmail.com>2019-12-09 03:57:49 +0300
committerbodqhrohro <bodqhrohro@gmail.com>2019-12-09 03:57:49 +0300
commitae2470dcb70c302bd3fbcd53ffa7384f526435bd (patch)
tree3a0f3dc6603cba4b08fb35111c7ecdf323cc6b18 /xmpp/gateway
parent503e3e0b628ee4cac1bbb6c72fbefe6e07466656 (diff)
Improve logging of presence sending failures
Diffstat (limited to 'xmpp/gateway')
-rw-r--r--xmpp/gateway/gateway.go5
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