From 322b6a0d52d94aa355032f3d51d2ab93c5f081a8 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Wed, 30 Nov 2022 18:53:09 +0100 Subject: [PATCH] set loglevels sooner --- owrx/__main__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/owrx/__main__.py b/owrx/__main__.py index b7a17b0..382a475 100644 --- a/owrx/__main__.py +++ b/owrx/__main__.py @@ -52,6 +52,9 @@ def main(): args = parser.parse_args() + if args.debug: + logging.getLogger().setLevel(logging.DEBUG) + if args.version: print("OpenWebRX version {version}".format(version=openwebrx_version)) return 0 @@ -84,13 +87,14 @@ Support and info: https://groups.io/g/openwebrx for sig in [signal.SIGINT, signal.SIGTERM]: signal.signal(sig, handleSignal) - # config warmup - Config.validateConfig() coreConfig = CoreConfig() # passed loglevel takes priority (used for the --debug argument) logging.getLogger().setLevel(coreConfig.get_log_level() if loglevel is None else loglevel) + # config warmup + Config.validateConfig() + featureDetector = FeatureDetector() failed = featureDetector.get_failed_requirements("core") if failed: