summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-09-20 00:03:01 +0200
committerWim <wim@42.be>2016-09-20 00:03:01 +0200
commit11f4a6897a572da407677d906ee3ecbea7a32e85 (patch)
treef09290aff0b06e8757a873e084feac61a64fba08
parent002c5fd0d1f0f777b93ba98e2f7081fe510939f1 (diff)
downloadmatterbridge-msglm-11f4a6897a572da407677d906ee3ecbea7a32e85.tar.gz
matterbridge-msglm-11f4a6897a572da407677d906ee3ecbea7a32e85.tar.bz2
matterbridge-msglm-11f4a6897a572da407677d906ee3ecbea7a32e85.zip
Cleanup xmpp bridge debug/info messages
-rw-r--r--bridge/xmpp/xmpp.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go
index 3de95450..a7c326be 100644
--- a/bridge/xmpp/xmpp.go
+++ b/bridge/xmpp/xmpp.go
@@ -37,7 +37,7 @@ func New(config config.Protocol, origin string, c chan config.Message) *Bxmpp {
func (b *Bxmpp) Connect() error {
var err error
- flog.Info("Trying XMPP connection")
+ flog.Infof("Connecting %s", b.Config.Server)
b.xc, err = b.createXMPP()
if err != nil {
flog.Debugf("%#v", err)
@@ -70,6 +70,7 @@ func (b *Bxmpp) Origin() string {
}
func (b *Bxmpp) Send(msg config.Message) error {
+ flog.Debugf("Receiving %#v", msg)
b.xc.Send(xmpp.Chat{Type: "groupchat", Remote: msg.Channel + "@" + b.Config.Muc, Text: msg.Username + msg.Text})
return nil
}
@@ -126,7 +127,7 @@ func (b *Bxmpp) handleXmpp() error {
nick = s[1]
}
if nick != b.Config.Nick {
- flog.Infof("sending message to remote %s %s %s", nick, v.Text, channel)
+ flog.Debugf("Sending message from %s on %s to gateway", nick, b.FullOrigin())
b.Remote <- config.Message{Username: nick, Text: v.Text, Channel: channel, Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()}
}
}