Add useful information in error logs.

This commit is contained in:
pitchum 2023-05-10 14:57:47 +02:00 committed by root
parent 211598633f
commit a368246de7

View File

@ -94,11 +94,11 @@ def parse_irc_messages(irc_msg: str) -> Tuple[str, str, str]:
try:
target = irc_msg.split(":")[1].split(" ")[2]
except Exception:
LOGGER.exception("Exception raised to irc message parsing")
LOGGER.warning("Failed to parse target for actor='{}' in the following incoming irc message: {}".format(actor, irc_msg))
target = None
return " ".join(irc_msg.split()), actor, target
except Exception:
LOGGER.exception("Exception raised to irc message parsing")
LOGGER.exception("Failed to parse the following incoming irc message: {}".format(irc_msg))
return None, None, None