[IMP] Log exception message in same error message as title. Log traceback when debugging.

bzr revid: tristan.hill@credativ.co.uk-20110105092606-xt4z6r7cundidtg8
This commit is contained in:
Tristan Hill 2011-01-05 09:26:06 +00:00
parent 0a29f54262
commit aeae9be58f
1 changed files with 4 additions and 3 deletions

View File

@ -91,9 +91,10 @@ class ir_cron(osv.osv, netsvc.Agent):
f(cr, uid, *args)
except Exception, e:
cr.rollback()
self._logger.notifyChannel('timers', netsvc.LOG_ERROR, "Job call of self.pool.get('%s').%s(cr, uid, *%r) failed" % (model, func, args))
self._logger.notifyChannel('timers', netsvc.LOG_ERROR, tools.exception_to_unicode(e))
self._logger.notifyChannel('timers', netsvc.LOG_ERROR,
"Job call of self.pool.get('%s').%s(cr, uid, *%r) failed\n%s" %
(model, func, args, tools.exception_to_unicode(e)))
self._logger.notifyChannel('timers', netsvc.LOG_DEBUG, traceback.format_exc())
def _poolJobs(self, db_name, check=False):
try: