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): ...@@ -180,6 +180,12 @@ class Application(object):
self._nm_release = lock.release self._nm_release = lock.release
self.compress = compress self.compress = compress
def log(self):
self.em.log()
self.nm.log()
if self.pt is not None:
self.pt.log()
@profiler_decorator @profiler_decorator
def _handlePacket(self, conn, packet, handler=None): def _handlePacket(self, conn, packet, handler=None):
""" """
......
...@@ -95,15 +95,19 @@ class Application(object): ...@@ -95,15 +95,19 @@ class Application(object):
registerLiveDebugger() 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): def run(self):
try: try:
self._run() self._run()
except: except:
logging.info('\nPre-mortem informations:') logging.info('\nPre-mortem informations:')
self.em.log() self.log()
self.nm.log()
self.pt.log()
self.tm.log()
raise raise
def _run(self): def _run(self):
......
...@@ -87,6 +87,14 @@ class Application(object): ...@@ -87,6 +87,14 @@ class Application(object):
registerLiveDebugger() 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): def loadConfiguration(self):
"""Load persistent configuration data from the database. """Load persistent configuration data from the database.
If data is not present, generate it.""" If data is not present, generate it."""
...@@ -149,12 +157,7 @@ class Application(object): ...@@ -149,12 +157,7 @@ class Application(object):
self._run() self._run()
except: except:
logging.info('\nPre-mortem informations:') logging.info('\nPre-mortem informations:')
self.em.log() self.log()
self.nm.log()
if self.pt is not None:
self.pt.log()
self.tm.log()
self.logQueuedEvents()
raise raise
def _run(self): 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