[IMP] move dispatch logger config to launcher script to avoid clobbering file-based or server-integrated logging config

bzr revid: xmo@openerp.com-20110907141935-0tudrot0yc49ma4y
This commit is contained in:
Xavier Morel 2011-09-07 16:19:35 +02:00
parent 51d0c0037b
commit 41dd081233
2 changed files with 3 additions and 3 deletions

View File

@ -27,9 +27,6 @@ __all__ = ['Root', 'jsonrequest', 'httprequest', 'Controller',
'WebRequest', 'JsonRequest', 'HttpRequest']
_logger = logging.getLogger(__name__)
if not _logger.handlers:
_logger.addHandler(logging.StreamHandler(sys.stdout))
_logger.propagate = False
#-----------------------------------------------------------
# Globals (wont move into a pool)

View File

@ -47,6 +47,9 @@ if __name__ == "__main__":
if not options.log_config:
logging.basicConfig(level=getattr(logging, options.log_level.upper()))
dispatch = logging.getLogger('web.common.dispatch')
dispatch.addHandler(logging.StreamHandler(sys.stdout))
dispatch.propagate = False
else:
logging.config.fileConfig(options.log_config)