master
sfan5 2014-07-19 21:48:09 +02:00
parent 5e0b460c9e
commit 03e2abc1e1
1 changed files with 1 additions and 1 deletions

2
log.py
View File

@ -19,7 +19,7 @@ actionhighlight = "sfan5"
def log(level, text, phenny):
level = level.upper()
f = open("bot.log", "a")
f.write(time.strftime("%F %H:%M:%S %z") + "\t" + loglevels[level] + "\t" + text+ "\n")
f.write(time.strftime("%F %H:%M:%S %z") + "\t" + loglevels[level] + "\t" + text.encode('utf-8') + "\n")
f.close()
if level == 'ACTION':
phenny.write(['PRIVMSG', actionchannel], actionhighlight + ": " + text)