Allow overriding container env vars

This commit is contained in:
Einar Forselv
2019-12-05 00:38:09 +01:00
parent fdfb28fc47
commit 9dabf01051
3 changed files with 15 additions and 5 deletions

View File

@@ -15,10 +15,6 @@ LOG_LEVELS = {
def setup(level: str = 'warning'):
"""Set up logging"""
# Get log level from env if not set directly
if level is None:
level = os.environ.get('LOG_LEVEL')
level = level or ""
level = LOG_LEVELS.get(level.lower(), DEFAULT_LOG_LEVEL)
logger.setLevel(level)