diff --git a/downloader/downloader/__main__.py b/downloader/downloader/__main__.py index 45d813e..2f2fa3f 100644 --- a/downloader/downloader/__main__.py +++ b/downloader/downloader/__main__.py @@ -3,6 +3,7 @@ import gevent.monkey gevent.monkey.patch_all() import logging +import os import argh @@ -10,5 +11,6 @@ from downloader.main import main LOG_FORMAT = "[%(asctime)s] %(levelname)8s %(name)s(%(module)s:%(lineno)d): %(message)s" -logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) +level = os.environ.get('WUBLOADER_LOG_LEVEL', 'INFO').upper() +logging.basicConfig(level=level, format=LOG_FORMAT) argh.dispatch_command(main) diff --git a/restreamer/restreamer/__main__.py b/restreamer/restreamer/__main__.py index 24935eb..f0ad12b 100644 --- a/restreamer/restreamer/__main__.py +++ b/restreamer/restreamer/__main__.py @@ -3,6 +3,7 @@ import gevent.monkey gevent.monkey.patch_all() import logging +import os import argh @@ -10,5 +11,6 @@ from restreamer.main import main LOG_FORMAT = "[%(asctime)s] %(levelname)8s %(name)s(%(module)s:%(lineno)d): %(message)s" -logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) +level = os.environ.get('WUBLOADER_LOG_LEVEL', 'INFO').upper() +logging.basicConfig(level=level, format=LOG_FORMAT) argh.dispatch_command(main)