From aeae9be58fb55c1e68a6bed10208f771804c13ea Mon Sep 17 00:00:00 2001 From: Tristan Hill Date: Wed, 5 Jan 2011 09:26:06 +0000 Subject: [PATCH] [IMP] Log exception message in same error message as title. Log traceback when debugging. bzr revid: tristan.hill@credativ.co.uk-20110105092606-xt4z6r7cundidtg8 --- bin/addons/base/ir/ir_cron.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/addons/base/ir/ir_cron.py b/bin/addons/base/ir/ir_cron.py index 55598f42825..723139512fc 100644 --- a/bin/addons/base/ir/ir_cron.py +++ b/bin/addons/base/ir/ir_cron.py @@ -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: