From 064ba4db228b09a7d948c2574c2606a3049df401 Mon Sep 17 00:00:00 2001 From: Nuno Maltez Date: May 16 2016 09:30:01 +0000 Subject: [PATCH 1/2] Get LOG_LEVEL config option in uppercase Only uppercase settings in the config file are set by Flask, as descibed in http://flask.pocoo.org/docs/0.10/config/#configuring-from-files --- diff --git a/pagure/__init__.py b/pagure/__init__.py index 0d3b67f..dc94463 100644 --- a/pagure/__init__.py +++ b/pagure/__init__.py @@ -144,7 +144,7 @@ if not APP.debug: # Send classic logs into syslog SHANDLER = logging.StreamHandler() -SHANDLER.setLevel(APP.config.get('log_level', 'INFO')) +SHANDLER.setLevel(APP.config.get('LOG_LEVEL', 'INFO')) APP.logger.addHandler(SHANDLER) LOG = APP.logger From 6edad308ec45dc6f490e5f524791d94768055263 Mon Sep 17 00:00:00 2001 From: Nuno Maltez Date: May 16 2016 09:30:01 +0000 Subject: [PATCH 2/2] Set the logging level of LOG to the value in config Otherwise the logger will use the value from getEffectiveLevel() --- diff --git a/pagure/__init__.py b/pagure/__init__.py index dc94463..7f6ff87 100644 --- a/pagure/__init__.py +++ b/pagure/__init__.py @@ -148,6 +148,7 @@ SHANDLER.setLevel(APP.config.get('LOG_LEVEL', 'INFO')) APP.logger.addHandler(SHANDLER) LOG = APP.logger +LOG.setLevel(APP.config.get('LOG_LEVEL', 'INFO')) APP.wsgi_app = pagure.proxy.ReverseProxied(APP.wsgi_app)