From eff41759bccd513ecd9af6385534ad3b858e7208 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 22 Nov 2020 17:20:20 +0100 Subject: Add extra debug to log time spent sending a message per bridge (#1299) --- gateway/gateway.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gateway') diff --git a/gateway/gateway.go b/gateway/gateway.go index 6a46ecf8..c1440c05 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -477,6 +477,10 @@ func (gw *Gateway) SendMessage( gw.Router.MattermostPlugin <- msg } + defer func(t time.Time) { + gw.logger.Debugf("=> Send from %s (%s) to %s (%s) took %s", msg.Account, rmsg.Channel, dest.Account, channel.Name, time.Since(t)) + }(time.Now()) + mID, err := dest.Send(msg) if err != nil { return mID, err -- cgit v1.2.3