diff options
-rw-r--r-- | service/pixelated/config/__init__.py | 2 | ||||
-rw-r--r-- | service/pixelated/config/logging_setup.py | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/service/pixelated/config/__init__.py b/service/pixelated/config/__init__.py index 35ae5e80..2706cd6f 100644 --- a/service/pixelated/config/__init__.py +++ b/service/pixelated/config/__init__.py @@ -46,7 +46,7 @@ def initialize(): args = parse_args() app = App() - init_logging(args) + init_logging(debug=args.debug) init_leap_cert(args) if args.register: diff --git a/service/pixelated/config/logging_setup.py b/service/pixelated/config/logging_setup.py index 023d9a9b..932f746d 100644 --- a/service/pixelated/config/logging_setup.py +++ b/service/pixelated/config/logging_setup.py @@ -19,13 +19,12 @@ import os from twisted.python import log -def init_logging(args): - debug_enabled = args.debug or os.environ.get('DEBUG', False) +def init_logging(debug=False): + debug_enabled = debug or os.environ.get('DEBUG', False) logging_level = logging.DEBUG if debug_enabled else logging.INFO log_format = "%(asctime)s [%(name)s] %(levelname)s %(message)s" date_format = '%Y-%m-%d %H:%M:%S' - logging.basicConfig(level=logging_level, format=log_format, datefmt=date_format, |