ir_logging fix config option

bzr revid: al@openerp.com-20140320000524-gs98xy6iqh2ceev6
This commit is contained in:
Antony Lesuisse 2014-03-20 01:05:24 +01:00
parent 666f4d0801
commit 6e4db0a0a6
2 changed files with 5 additions and 5 deletions

View File

@ -22,23 +22,23 @@
import logging
import logging.handlers
import os
import pprint
import release
import sys
import threading
from pprint import pformat
import psycopg2
import tools
import openerp
import sql_db
import tools
_logger = logging.getLogger(__name__)
def log(logger, level, prefix, msg, depth=None):
indent=''
indent_after=' '*len(prefix)
for line in (prefix+pformat(msg, depth=depth)).split('\n'):
for line in (prefix + pprint.pformat(msg, depth=depth)).split('\n'):
logger.log(level, indent+line)
indent=indent_after

View File

@ -187,7 +187,7 @@ class configmanager(object):
group.add_option('--log-response', action="append_const", dest="log_handler", const="openerp.netsvc.rpc.response:DEBUG", help='shortcut for --log-handler=openerp.netsvc.rpc.response:DEBUG')
group.add_option('--log-web', action="append_const", dest="log_handler", const="openerp.addons.web.http:DEBUG", help='shortcut for --log-handler=openerp.addons.web.http:DEBUG')
group.add_option('--log-sql', action="append_const", dest="log_handler", const="openerp.sql_db:DEBUG", help='shortcut for --log-handler=openerp.sql_db:DEBUG')
group.add_option('--log-db', dest='log_db', help="database where OpenERP will store the exceptions", my_default=False)
group.add_option('--log-db', dest='log_db', help="Logging database", my_default=False)
# For backward-compatibility, map the old log levels to something
# quite close.
levels = [
@ -392,7 +392,7 @@ class configmanager(object):
'xmlrpc', 'syslog', 'without_demo', 'timezone',
'xmlrpcs_interface', 'xmlrpcs_port', 'xmlrpcs',
'static_http_enable', 'static_http_document_root', 'static_http_url_prefix',
'secure_cert_file', 'secure_pkey_file', 'dbfilter', 'log_handler', 'log_level'
'secure_cert_file', 'secure_pkey_file', 'dbfilter', 'log_handler', 'log_level', 'log_db'
]
for arg in keys: