Skip to content

Commit

Permalink
Fix mistakes with watcher loglevel handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarlow83 committed Oct 28, 2023
1 parent aac913c commit 52d9973
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misc/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 '{}')
Expand Down

0 comments on commit 52d9973

Please sign in to comment.