Log message for revision 38483:
  added FilelogHandler
  

Changed:
  U   
Zope/branches/Zope-2_8-branch/lib/python/Products/ZCatalog/ProgressHandler.py

-=-
Modified: 
Zope/branches/Zope-2_8-branch/lib/python/Products/ZCatalog/ProgressHandler.py
===================================================================
--- 
Zope/branches/Zope-2_8-branch/lib/python/Products/ZCatalog/ProgressHandler.py   
    2005-09-16 08:29:14 UTC (rev 38482)
+++ 
Zope/branches/Zope-2_8-branch/lib/python/Products/ZCatalog/ProgressHandler.py   
    2005-09-16 08:31:08 UTC (rev 38483)
@@ -95,3 +95,17 @@
     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')
+
+
+

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to