3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-25 18:00:39 +01:00

log: split multi-line channel logs into multiple PRIVMSGs

Closes #175.
This commit is contained in:
James Lu 2016-03-16 15:38:07 -07:00
parent a8303d0110
commit abce18a5ba

3
log.py
View File

@ -101,8 +101,9 @@ class PyLinkChannelLogger(logging.Handler):
# Send the message. If this fails, abort. No more messages will be
# sent from this logger until the next sending succeeds.
for line in msg.splitlines():
try:
self.irc.msg(self.channel, msg)
self.irc.msg(self.channel, line)
except:
return
else: