From 79cd7d73c4653d6fececede2c60bba917031a037 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Mon, 3 Jul 2017 20:53:44 +0200 Subject: [PATCH] add some more logging to the irc bot --- src/ircbot/irc3module.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ircbot/irc3module.py b/src/ircbot/irc3module.py index 9a21336c..5e3a7b0d 100644 --- a/src/ircbot/irc3module.py +++ b/src/ircbot/irc3module.py @@ -70,9 +70,10 @@ class Plugin(object): """ #logger.debug("inside get_outgoing_messages()") for msg in OutgoingIrcMessage.objects.filter(processed=False).order_by('created'): + logger.info("processing irc message to %s: %s" % (msg.target, msg.message)) # if this message expired mark it as expired and processed without doing anything if msg.timeout < timezone.now(): - # this message is expired + logger.info("this message is expired, marking it as such instead of sending it to irc") msg.expired=True msg.processed=True msg.save() @@ -80,11 +81,12 @@ class Plugin(object): # is this message for a channel or a nick? if msg.target[0] == "#" and msg.target in self.bot.channels: - logger.debug("sending privmsg to %s: %s" % (msg.target, msg.message)) + logger.info("sending privmsg to %s: %s" % (msg.target, msg.message)) self.bot.privmsg(msg.target, msg.message) msg.processed=True msg.save() elif msg.target: + logger.info("sending privmsg to %s: %s" % (msg.target, msg.message)) self.bot.privmsg(msg.target, msg.message) msg.processed=True msg.save()