From cd37ee2369a692371c4adb0d551d99b5dcc3a3c4 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 31 Jan 2014 13:10:15 -0500 Subject: [PATCH] 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 --- elastic_recheck/bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elastic_recheck/bot.py b/elastic_recheck/bot.py index 4fa3ba3e..b08e786e 100755 --- a/elastic_recheck/bot.py +++ b/elastic_recheck/bot.py @@ -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__":