Commit c1f8421f authored by Andreas Jung's avatar Andreas Jung

added FilelogHandler

parent 7a57f1df
......@@ -95,3 +95,16 @@ class ZLogHandler(StdoutHandler):
def output(self, text):
LOG(self._ident, INFO, text)
class FilelogHandler(StdoutHandler)
""" Use a custom file for logging """
__implements__ = IProgressHandler
def __init__(self, filename, steps=100):
StdoutHandler.__init__(self, steps)
self.filename = filename
def output(self, text):
open(self.filename, 'a').write(text + '\n')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment