summaryrefslogtreecommitdiffstats
path: root/bridge/slack/slack.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-02-28 22:23:29 +0100
committerWim <wim@42.be>2018-02-28 22:23:29 +0100
commit594d2155e3cbf06f307d076c95984906b53cb40a (patch)
treeba5a8e62a1642e6489a0f663b08380d45d50e746 /bridge/slack/slack.go
parent20dbd713068347ba9a025e02fb0a101e07e6982c (diff)
downloadmatterbridge-msglm-594d2155e3cbf06f307d076c95984906b53cb40a.tar.gz
matterbridge-msglm-594d2155e3cbf06f307d076c95984906b53cb40a.tar.bz2
matterbridge-msglm-594d2155e3cbf06f307d076c95984906b53cb40a.zip
Improve debug messages
Diffstat (limited to 'bridge/slack/slack.go')
-rw-r--r--bridge/slack/slack.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index 7f506409..009a33a4 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -108,7 +108,7 @@ func (b *Bslack) JoinChannel(channel config.ChannelInfo) error {
}
func (b *Bslack) Send(msg config.Message) (string, error) {
- b.Log.Debugf("Receiving %#v", msg)
+ b.Log.Debugf("=> Receiving %#v", msg)
// Make a action /me of the message
if msg.Event == config.EVENT_USER_ACTION {
@@ -190,7 +190,6 @@ func (b *Bslack) Send(msg config.Message) (string, error) {
}
// Post normal message
- b.Log.Debugf("NP IS %#v", np)
_, id, err := b.sc.PostMessage(schannel.ID, msg.Text, np)
if err != nil {
return "", err
@@ -246,7 +245,7 @@ func (b *Bslack) handleSlack() {
time.Sleep(time.Second)
b.Log.Debug("Start listening for Slack messages")
for message := range messages {
- b.Log.Debugf("Sending message from %s on %s to gateway", message.Username, b.Account)
+ b.Log.Debugf("<= Sending message from %s on %s to gateway", message.Username, b.Account)
// cleanup the message
message.Text = b.replaceURL(message.Text)
@@ -258,7 +257,7 @@ func (b *Bslack) handleSlack() {
// Add the avatar
message.Avatar = b.getAvatar(message.Username)
- b.Log.Debugf("Message is %#v", message)
+ b.Log.Debugf("<= Message is %#v", message)
b.Remote <- *message
}
}
@@ -266,7 +265,7 @@ func (b *Bslack) handleSlack() {
func (b *Bslack) handleSlackClient(messages chan *config.Message) {
for msg := range b.rtm.IncomingEvents {
if msg.Type != "user_typing" && msg.Type != "latency_report" {
- b.Log.Debugf("Receiving from slackclient %#v", msg.Data)
+ b.Log.Debugf("== Receiving event %#v", msg.Data)
}
switch ev := msg.Data.(type) {
case *slack.MessageEvent: