Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 8a2a3c4ef58c704b73ffd10133cbbe4a9ff8415b Author: Wim <wim@42.be> Date: Tue Sep 20 00:03:01 2016 +0000 Cleanup xmpp bridge debug/info messages diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go index 3de9545..a7c326b 100644 --- a/bridge/xmpp/xmpp.go +++ b/bridge/xmpp/xmpp.go @@ -377 +377 @@ 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) @@ -706 +707 @@ 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  } @@ -1267 +1277 @@ 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()}   }   }