[Checkins] SVN: zope.server/trunk/ - The log message "Exception during task" is no longer logged to the root

Christian Zagrodnick cz at gocept.com
Thu May 27 06:35:12 EDT 2010


Log message for revision 112771:
  - The log message "Exception during task" is no longer logged to the root
    logger but to zope.server.taskthreads.
  
  

Changed:
  U   zope.server/trunk/CHANGES.txt
  U   zope.server/trunk/src/zope/server/taskthreads.py

-=-
Modified: zope.server/trunk/CHANGES.txt
===================================================================
--- zope.server/trunk/CHANGES.txt	2010-05-27 10:32:27 UTC (rev 112770)
+++ zope.server/trunk/CHANGES.txt	2010-05-27 10:35:12 UTC (rev 112771)
@@ -6,7 +6,8 @@
 3.6.2 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- The log message "Exception during task" is no longer logged to the root
+  logger but to zope.server.taskthreads.
 
 
 3.6.1 (2009-10-07)

Modified: zope.server/trunk/src/zope/server/taskthreads.py
===================================================================
--- zope.server/trunk/src/zope/server/taskthreads.py	2010-05-27 10:32:27 UTC (rev 112770)
+++ zope.server/trunk/src/zope/server/taskthreads.py	2010-05-27 10:35:12 UTC (rev 112771)
@@ -24,6 +24,9 @@
 from zope.interface import implements
 
 
+log = logging.getLogger(__name__)
+
+
 class ThreadedTaskDispatcher(object):
     """A Task Dispatcher that creates a thread for each task."""
 
@@ -47,7 +50,7 @@
                 try:
                     task.service()
                 except:
-                    logging.exception('Exception during task')
+                    log.exception('Exception during task')
         finally:
             mlock = self.thread_mgmt_lock
             mlock.acquire()
@@ -104,7 +107,7 @@
         expiration = time() + timeout
         while threads:
             if time() >= expiration:
-                logging.error("%d thread(s) still running" % len(threads))
+                log.error("%d thread(s) still running" % len(threads))
                 break
             sleep(0.1)
         if cancel_pending:



More information about the checkins mailing list