From 7a236fd9297856c8a2fcc5c2e510e6a64ee95aea Mon Sep 17 00:00:00 2001 From: Breakthrough Date: Fri, 28 Feb 2025 21:24:36 -0500 Subject: [PATCH] [shared] Fix tqdm.logging_redirect_tqdm not respecting logger verbosity Being tracked by https://github.com/tqdm/tqdm/issues/1272 upstream. --- dvr_scan/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dvr_scan/__main__.py b/dvr_scan/__main__.py index 56b1165..c1f6b31 100644 --- a/dvr_scan/__main__.py +++ b/dvr_scan/__main__.py @@ -32,6 +32,10 @@ def main(): if settings is None: sys.exit(EXIT_ERROR) logger = logging.getLogger("dvr_scan") + # TODO(1.7): The logging redirect does not respect the original log level, which is now set to + # DEBUG mode for rolling log files. + # We might have to just roll our own instead of relying on this one. + # TODO: Use Python __debug__ mode instead of hard-coding as config option. debug_mode = settings.get("debug") show_traceback = getattr(logging, settings.get("verbosity").upper()) == logging.DEBUG with logging_redirect_tqdm(loggers=[logger]):