by default flush log writes to files

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-11-24 02:48:13 -08:00
parent 9652be0ac1
commit 8c6593cc08
1 changed files with 2 additions and 0 deletions

View File

@ -132,6 +132,8 @@ class File(object):
def __call__(self, msg):
""" write a message to the log """
self._file.write(str(msg) + "\n")
if hasattr(self._file, 'flush'):
self._file.flush()
class Path(object):
""" log consumer that opens and writes to a Path """