Added DEBUG envvar
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-07-30 11:46:06 +02:00
parent aa2cc0214c
commit 3509698703
2 changed files with 9 additions and 1 deletions

View File

@@ -1,4 +1,6 @@
import os
import sys
import logging
class Config:
@@ -13,3 +15,9 @@ class Config:
RELEASE_ID = os.environ.get('RELEASE_ID', 'test')
RELEASEMODE = os.environ.get('RELEASEMODE', 'dev')
LOG_LEVEL = logging.DEBUG if (
'--debug' in sys.argv
) or (
os.environ.get('DEBUG', '0').lower() in ['yes', 'true', '1']
) else logging.INFO