[REF] ir_cron: use DEBUG instead of DEBUG_RPC (as done previously).

bzr revid: vmt@openerp.com-20110628153148-hkxh5n1ct4y8k6z3
This commit is contained in:
Vo Minh Thu 2011-06-28 17:31:48 +02:00
parent 23ecb4f956
commit 5ae5809dab
1 changed files with 3 additions and 3 deletions

View File

@ -100,12 +100,12 @@ class ir_cron(osv.osv, netsvc.Agent):
netsvc.log('cron', (cr.dbname,uid,'*',model,func)+tuple(args), channel=logging.DEBUG,
depth=(None if self._logger.isEnabledFor(logging.DEBUG_RPC_ANSWER) else 1), fn='object.execute')
logger = logging.getLogger('execution time')
if logger.isEnabledFor(logging.DEBUG_RPC):
if logger.isEnabledFor(logging.DEBUG):
start_time = time.time()
f(cr, uid, *args)
if logger.isEnabledFor(logging.DEBUG_RPC):
if logger.isEnabledFor(logging.DEBUG):
end_time = time.time()
logger.log(logging.DEBUG_RPC, '%.3fs (%s, %s)' % (end_time - start_time, model, func))
logger.log(logging.DEBUG, '%.3fs (%s, %s)' % (end_time - start_time, model, func))
except Exception, e:
self._handle_callback_exception(cr, uid, model, func, args, job_id, e)