diff options
author | Wim <wim@42.be> | 2018-02-28 22:23:29 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-02-28 22:23:29 +0100 |
commit | 594d2155e3cbf06f307d076c95984906b53cb40a (patch) | |
tree | ba5a8e62a1642e6489a0f663b08380d45d50e746 /bridge/telegram/telegram.go | |
parent | 20dbd713068347ba9a025e02fb0a101e07e6982c (diff) | |
download | matterbridge-msglm-594d2155e3cbf06f307d076c95984906b53cb40a.tar.gz matterbridge-msglm-594d2155e3cbf06f307d076c95984906b53cb40a.tar.bz2 matterbridge-msglm-594d2155e3cbf06f307d076c95984906b53cb40a.zip |
Improve debug messages
Diffstat (limited to 'bridge/telegram/telegram.go')
-rw-r--r-- | bridge/telegram/telegram.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index b407e0ce..073eda7c 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -50,7 +50,7 @@ func (b *Btelegram) JoinChannel(channel config.ChannelInfo) error { } func (b *Btelegram) Send(msg config.Message) (string, error) { - b.Log.Debugf("Receiving %#v", msg) + b.Log.Debugf("=> Receiving %#v", msg) // get the chatid chatid, err := strconv.ParseInt(msg.Channel, 10, 64) @@ -119,7 +119,7 @@ func (b *Btelegram) Send(msg config.Message) (string, error) { func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) { for update := range updates { - b.Log.Debugf("Receiving from telegram: %#v", update.Message) + b.Log.Debugf("== Receiving event: %#v", update.Message) if update.Message == nil && update.ChannelPost == nil { b.Log.Error("Getting nil messages, this shouldn't happen.") @@ -226,8 +226,8 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) { if rmsg.Text != "" || len(rmsg.Extra) > 0 { rmsg.Avatar = helper.GetAvatar(b.avatarMap, strconv.Itoa(message.From.ID), b.General) - b.Log.Debugf("Sending message from %s on %s to gateway", rmsg.Username, b.Account) - b.Log.Debugf("Message is %#v", rmsg) + b.Log.Debugf("<= Sending message from %s on %s to gateway", rmsg.Username, b.Account) + b.Log.Debugf("<= Message is %#v", rmsg) b.Remote <- rmsg } } |