[IMP] logging: fixed DEBUG_RPC logging to be included at DEBUG_SQL level

bzr revid: odo@openerp.com-20100805181045-9h4mdvc6itjr3oiv
This commit is contained in:
Olivier Dony 2010-08-05 20:10:45 +02:00
parent d7deee94f7
commit 69cd88bf10
1 changed files with 4 additions and 2 deletions

View File

@ -395,8 +395,10 @@ class OpenERPDispatcherException(Exception):
class OpenERPDispatcher:
def log(self, title, msg):
if tools.config['log_level'] == logging.DEBUG_RPC:
Logger().notifyChannel('%s' % title, LOG_DEBUG_RPC, pformat(msg))
logger = logging.getLogger(title)
if logger.isEnabledFor(logging.DEBUG_RPC):
for line in pformat(msg).split('\n'):
logger.log(logging.DEBUG_RPC, line)
def dispatch(self, service_name, method, params):
try: