Skip to content

Commit

Permalink
[shared] Fix tqdm.logging_redirect_tqdm not respecting logger verbosity
Browse files Browse the repository at this point in the history
Being tracked by tqdm/tqdm#1272 upstream.
  • Loading branch information
Breakthrough committed Mar 1, 2025
1 parent 3de400e commit 7a236fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dvr_scan/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down

0 comments on commit 7a236fd

Please sign in to comment.