[Zope-Checkins] SVN: Zope/branches/haufe-legacy-integration/ - Launchpad #373621: catching and logging exceptions that could cause
Log message for revision 99823: - Launchpad #373621: catching and logging exceptions that could cause leaking of worker threads Changed: U Zope/branches/haufe-legacy-integration/doc/CHANGES.rst U Zope/branches/haufe-legacy-integration/src/Zope2/Startup/__init__.py -=- Modified: Zope/branches/haufe-legacy-integration/doc/CHANGES.rst === --- Zope/branches/haufe-legacy-integration/doc/CHANGES.rst 2009-05-10 15:22:55 UTC (rev 99822) +++ Zope/branches/haufe-legacy-integration/doc/CHANGES.rst 2009-05-10 15:28:15 UTC (rev 99823) @@ -26,6 +26,9 @@ - Launchpad #373621: catching and logging exceptions that could cause leaking of worker threads +- Launchpad #373577: setting up standard logging earlier within the startup + phase for improving the analysis of startup errors + - zExceptions.convertExceptionType: new API, breaking out conversion of exception names to exception types from 'upgradeException'. Modified: Zope/branches/haufe-legacy-integration/src/Zope2/Startup/__init__.py === --- Zope/branches/haufe-legacy-integration/src/Zope2/Startup/__init__.py 2009-05-10 15:22:55 UTC (rev 99822) +++ Zope/branches/haufe-legacy-integration/src/Zope2/Startup/__init__.py 2009-05-10 15:28:15 UTC (rev 99823) @@ -86,6 +86,7 @@ self.setupServers() # drop privileges after setting up servers self.dropPrivileges() +self.setupFinalLogging() self.makeLockFile() self.makePidFile() self.setupInterpreter() @@ -100,7 +101,6 @@ # after it has emitted ZServer messages. logger.info('Ready to handle requests') -self.setupFinalLogging() self.sendEvents() def run(self): ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/haufe-legacy-integration/ - Launchpad #373621: catching and logging exceptions that could cause
Log message for revision 99821: - Launchpad #373621: catching and logging exceptions that could cause leaking of worker threads Changed: U Zope/branches/haufe-legacy-integration/doc/CHANGES.rst U Zope/branches/haufe-legacy-integration/src/ZServer/PubCore/ZServerPublisher.py -=- Modified: Zope/branches/haufe-legacy-integration/doc/CHANGES.rst === --- Zope/branches/haufe-legacy-integration/doc/CHANGES.rst 2009-05-10 15:14:02 UTC (rev 99820) +++ Zope/branches/haufe-legacy-integration/doc/CHANGES.rst 2009-05-10 15:22:15 UTC (rev 99821) @@ -23,6 +23,9 @@ Features Added ++ +- Launchpad #373621: catching and logging exceptions that could cause + leaking of worker threads + - zExceptions.convertExceptionType: new API, breaking out conversion of exception names to exception types from 'upgradeException'. Modified: Zope/branches/haufe-legacy-integration/src/ZServer/PubCore/ZServerPublisher.py === --- Zope/branches/haufe-legacy-integration/src/ZServer/PubCore/ZServerPublisher.py 2009-05-10 15:14:02 UTC (rev 99820) +++ Zope/branches/haufe-legacy-integration/src/ZServer/PubCore/ZServerPublisher.py 2009-05-10 15:22:15 UTC (rev 99821) @@ -11,11 +11,17 @@ # ## +import logging + +LOG = logging.getLogger('ZServerPublisher') + class ZServerPublisher: def __init__(self, accept): +from sys import exc_info from ZPublisher import publish_module from ZPublisher.WSGIPublisher import publish_module as publish_wsgi while 1: + try: name, a, b=accept() if name == "Zope2": try: @@ -36,3 +42,5 @@ # TODO: Support keeping connections open. a['wsgi.output']._close = 1 a['wsgi.output'].close() + except: +LOG.error('exception caught', exc_info=True) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins