From 594d2155e3cbf06f307d076c95984906b53cb40a Mon Sep 17 00:00:00 2001 From: Wim Date: Wed, 28 Feb 2018 22:23:29 +0100 Subject: Improve debug messages --- bridge/telegram/telegram.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bridge/telegram/telegram.go') 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 } } -- cgit v1.2.3