diff options
author | Bruno Wagner <bwgpro@gmail.com> | 2015-06-02 18:18:09 -0300 |
---|---|---|
committer | Bruno Wagner <bwgpro@gmail.com> | 2015-06-02 18:18:09 -0300 |
commit | ceb0af34967ba9c21ac710fdc0e3f62ae2358fc1 (patch) | |
tree | 3296762c2de390f53d251a30f7d330f5eea117a2 | |
parent | 1db9c6fafb07bc7ee3b086c49135cc667e4bd4a1 (diff) |
Logging initializer don't need the whole args, only the debug option
-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, |