From 52d99732b12ce734881e7115388b88d810bd1858 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Sat, 28 Oct 2023 00:47:40 -0700 Subject: [PATCH] Fix mistakes with watcher loglevel handling --- misc/watcher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/watcher.py b/misc/watcher.py index 4ad18b40b..bd23e1eb4 100644 --- a/misc/watcher.py +++ b/misc/watcher.py @@ -260,12 +260,12 @@ def main( ocrmypdf.configure_logging( verbosity=( ocrmypdf.Verbosity.default - if loglevel != 'DEBUG' + if loglevel != LoggingLevelEnum.DEBUG else ocrmypdf.Verbosity.debug ), manage_root_logger=True, ) - log.setLevel(loglevel) + log.setLevel(loglevel.value) log.info( f"Starting OCRmyPDF watcher with config:\n" f"Input Directory: {input_dir}\n" @@ -285,7 +285,7 @@ def main( f"POLL_NEW_FILE_SECONDS: {poll_new_file_seconds}\n" f"RETRIES_LOADING_FILE: {retries_loading_file}\n" f"USE_POLLING: {use_polling}\n" - f"LOGLEVEL: {loglevel}" + f"LOGLEVEL: {loglevel.value}" ) json_settings = json.loads(ocr_json_settings.read() if ocr_json_settings else '{}')