[Python-checkins] r85017 - in python/branches: py3k/Lib/logging/__init__.py release27-maint/Lib/logging/__init__.py

vinay.sajip python-checkins at python.org
Sun Sep 26 13:04:10 CEST 2010


Author: vinay.sajip
Date: Sun Sep 26 13:04:10 2010
New Revision: 85017

Log:
logging: NullHandler optimisation.

Modified:
   python/branches/py3k/Lib/logging/__init__.py
   python/branches/release27-maint/Lib/logging/__init__.py

Modified: python/branches/py3k/Lib/logging/__init__.py
==============================================================================
--- python/branches/py3k/Lib/logging/__init__.py	(original)
+++ python/branches/py3k/Lib/logging/__init__.py	Sun Sep 26 13:04:10 2010
@@ -1652,9 +1652,15 @@
     a NullHandler and add it to the top-level logger of the library module or
     package.
     """
+    def handle(self, record):
+        pass
+
     def emit(self, record):
         pass
 
+    def createLock(self):
+        self.lock = None
+
 # Warnings integration
 
 _warnings_showwarning = None

Modified: python/branches/release27-maint/Lib/logging/__init__.py
==============================================================================
--- python/branches/release27-maint/Lib/logging/__init__.py	(original)
+++ python/branches/release27-maint/Lib/logging/__init__.py	Sun Sep 26 13:04:10 2010
@@ -1656,9 +1656,15 @@
     a NullHandler and add it to the top-level logger of the library module or
     package.
     """
+    def handle(self, record):
+        pass
+
     def emit(self, record):
         pass
 
+    def createLock(self):
+        self.lock = None
+
 # Warnings integration
 
 _warnings_showwarning = None


More information about the Python-checkins mailing list