Commit 37f10acb authored by Grégory Wisniewski's avatar Grégory Wisniewski

Define main log() at application level for consistency.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2156 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 4a911356
......@@ -180,6 +180,12 @@ class Application(object):
self._nm_release = lock.release
self.compress = compress
def log(self):
self.em.log()
self.nm.log()
if self.pt is not None:
self.pt.log()
@profiler_decorator
def _handlePacket(self, conn, packet, handler=None):
"""
......
......@@ -95,15 +95,19 @@ class Application(object):
registerLiveDebugger()
def log(self):
self.em.log()
self.nm.log()
self.tm.log()
if self.pt is not None:
self.pt.log()
def run(self):
try:
self._run()
except:
logging.info('\nPre-mortem informations:')
self.em.log()
self.nm.log()
self.pt.log()
self.tm.log()
self.log()
raise
def _run(self):
......
......@@ -87,6 +87,14 @@ class Application(object):
registerLiveDebugger()
def log(self):
self.em.log()
self.logQueuedEvents()
self.nm.log()
self.tm.log()
if self.pt is not None:
self.pt.log()
def loadConfiguration(self):
"""Load persistent configuration data from the database.
If data is not present, generate it."""
......@@ -149,12 +157,7 @@ class Application(object):
self._run()
except:
logging.info('\nPre-mortem informations:')
self.em.log()
self.nm.log()
if self.pt is not None:
self.pt.log()
self.tm.log()
self.logQueuedEvents()
self.log()
raise
def _run(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment