From ece2964c9aaa6f5a3aec153ebde900168e68a0b2 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 25 May 2021 18:40:06 +0200 Subject: [PATCH] Add traces for automessage disable Signed-off-by: Knut Ahlers --- automessage.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automessage.go b/automessage.go index d1dae09..c637879 100644 --- a/automessage.go +++ b/automessage.go @@ -74,6 +74,9 @@ func (a *autoMessage) CanSend() bool { } if !a.allowExecuteDisableOnTemplate() { + log.Trace("Auto-Message disabled by template") + // Reset the timer for this execution not to spam every second + a.lastMessageSent = time.Now() return false } @@ -154,6 +157,7 @@ func (a *autoMessage) allowExecuteDisableOnTemplate() bool { "channel": a.Channel, }) if err != nil { + log.WithError(err).Error("Error in auto-message disable template") // Caused an error, forbid execution return false }