diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-06-13 02:19:01 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-06-13 02:19:01 +0000 |
commit | ff33a84de722c62af1268421133c7376eb35c4f6 (patch) | |
tree | 821b8a7b39d3b34be1398be99613a0538c6a5c18 /src/logging.py | |
parent | 94d9d02e8f7049cff2befbed853a1cc8075a99d5 (diff) | |
download | poezio-ff33a84de722c62af1268421133c7376eb35c4f6.tar.gz poezio-ff33a84de722c62af1268421133c7376eb35c4f6.tar.bz2 poezio-ff33a84de722c62af1268421133c7376eb35c4f6.tar.xz poezio-ff33a84de722c62af1268421133c7376eb35c4f6.zip |
logs work. fixed #1108
Diffstat (limited to 'src/logging.py')
-rw-r--r-- | src/logging.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/logging.py b/src/logging.py index aa466348..42a82760 100644 --- a/src/logging.py +++ b/src/logging.py @@ -68,7 +68,10 @@ class Logger(object): makedirs(dir) except:pass fd = open(dir+room, 'a') - fd.write(datetime.now().strftime('%d-%m-%y [%H:%M:%S] ')+nick+': '+msg+'\n') + if nick: + fd.write(datetime.now().strftime('%d-%m-%y [%H:%M:%S] ')+nick.encode('utf-8')+': '+msg.encode('utf-8')+'\n') + else: + fd.write(datetime.now().strftime('%d-%m-%y [%H:%M:%S] ')+'* '+msg.encode('utf-8')+'\n') fd.close() logger = Logger() |