[Zope3-checkins] SVN: zope.testing/trunk/src/zope/testing/loggingsupport.py Docstring lied about level arg to InstalledHandler constructor.

Paul Winkler pw_lists at slinkp.com
Wed Apr 12 16:57:45 EDT 2006


Log message for revision 66909:
  Docstring lied about level arg to InstalledHandler constructor.
  Fixed and tested.
  

Changed:
  U   zope.testing/trunk/src/zope/testing/loggingsupport.py

-=-
Modified: zope.testing/trunk/src/zope/testing/loggingsupport.py
===================================================================
--- zope.testing/trunk/src/zope/testing/loggingsupport.py	2006-04-12 20:32:05 UTC (rev 66908)
+++ zope.testing/trunk/src/zope/testing/loggingsupport.py	2006-04-12 20:57:44 UTC (rev 66909)
@@ -24,6 +24,8 @@
 level keyword argument.  The level setting effects only the named
 loggers.
 
+  >>> handler_with_levels = InstalledHandler('baz', level=logging.WARNING)
+
 Then, any log output is collected in the handler:
 
   >>> logging.getLogger('foo.bar').exception('eek')
@@ -48,6 +50,7 @@
 After checking the log output, you need to uninstall the handler:
 
   >>> handler.uninstall()
+  >>> handler_with_levels.uninstall()
 
 At which point, the handler won't get any more log output.
 Let's clear the handler:
@@ -116,6 +119,6 @@
 
 class InstalledHandler(Handler):
 
-    def __init__(self, *names):
-        Handler.__init__(self, *names)
+    def __init__(self, *names, **kw):
+        Handler.__init__(self, *names, **kw)
         self.install()



More information about the Zope3-Checkins mailing list