[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:
parent
51d0c0037b
commit
41dd081233
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue