Write out log strings as utf8

This commit is contained in:
Dan Williams 2006-08-29 11:52:49 -04:00
parent 47af6a7b9d
commit 721ef6e29c

View File

@ -69,7 +69,9 @@ class MessageQueue:
level = self._levels[x] level = self._levels[x]
msg = self._messages[x] msg = self._messages[x]
prog = os.path.basename(sys.argv[0]) prog = os.path.basename(sys.argv[0])
sys.stderr.write("%s (%s): Level %s - %s\n" % (prog, os.getpid(), level, msg)) fmt = "%s (%s): Level %s - %s\n" % (prog, os.getpid(), level, msg)
fmt = fmt.encode("utf8")
sys.stderr.write(fmt)
self._levels = [] self._levels = []
self._messages = [] self._messages = []