if we have a logging config file, use it

this ensures that we don't break upstream logging configuration
by setting levels too early.

Change-Id: Idc759da2877f28cbb258bdbc302921605e3299f6
This commit is contained in:
Sean Dague 2014-01-31 13:10:15 -05:00
parent a641283270
commit cd37ee2369
1 changed files with 3 additions and 3 deletions

View File

@ -316,9 +316,6 @@ def setup_logging(config):
"pyelasticsearch": logging.INFO,
"requests.packages.urllib3.connectionpool": logging.WARN
}
for module in loglevels:
log = logging.getLogger(module)
log.setLevel(loglevels[module])
if config.has_option('ircbot', 'log_config'):
log_config = config.get('ircbot', 'log_config')
@ -332,6 +329,9 @@ def setup_logging(config):
format=FORMAT,
datefmt=DATEFMT
)
for module in loglevels:
log = logging.getLogger(module)
log.setLevel(loglevels[module])
if __name__ == "__main__":