Flush the stream after writing a log

This commit is contained in:
Marco Pesenti Gritti 2006-10-16 16:56:48 +02:00
parent ab55456801
commit 4a65739b71

View File

@ -43,6 +43,7 @@ class LogWriter:
fmt = "(%s): Level %s - %s\n" % (os.getpid(), level, msg)
fmt = fmt.encode("utf8")
self._log_file.write(fmt)
self._log_file.flush()
class Handler(logging.Handler):
def __init__(self, writer):