[IMP] only concatenate logging configuration subsequences once

bzr revid: xmo@openerp.com-20130319163708-s4mxsdg3f9xksr07
This commit is contained in:
Xavier Morel 2013-03-19 17:37:08 +01:00
parent 7c2b70eb46
commit 9476f07954
1 changed files with 3 additions and 2 deletions

View File

@ -134,7 +134,8 @@ def init_logger():
logconfig = tools.config['log_handler']
for logconfig_item in DEFAULT_LOG_CONFIGURATION + pseudo_config + logconfig:
logging_configurations = DEFAULT_LOG_CONFIGURATION + pseudo_config + logconfig
for logconfig_item in logging_configurations:
loggername, level = logconfig_item.split(':')
level = getattr(logging, level, logging.INFO)
logger = logging.getLogger(loggername)
@ -144,7 +145,7 @@ def init_logger():
if loggername != '':
logger.propagate = False
for logconfig_item in DEFAULT_LOG_CONFIGURATION + pseudo_config + logconfig:
for logconfig_item in logging_configurations:
_logger.debug('logger level set: "%s"', logconfig_item)
DEFAULT_LOG_CONFIGURATION = [