From 44923673ef66183b368ff9d722845a5930cc996d Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:09:52 +0100 Subject: [PATCH] ocrd_cli_wrap_processor: always do initLogging --- src/ocrd/decorators/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ocrd/decorators/__init__.py b/src/ocrd/decorators/__init__.py index bc969b327..67e5d0fdf 100644 --- a/src/ocrd/decorators/__init__.py +++ b/src/ocrd/decorators/__init__.py @@ -47,6 +47,9 @@ def ocrd_cli_wrap_processor( # ocrd_network params end # **kwargs ): + # init logging handlers so no imported libs can preempt ours + initLogging() + if not sys.argv[1:]: processorClass(None, show_help=True) sys.exit(1) @@ -67,8 +70,6 @@ def ocrd_cli_wrap_processor( # Used for checking/starting network agents for the WebAPI architecture check_and_run_network_agent(processorClass, subcommand, address, database, queue) - initLogging() - LOG = getLogger('ocrd.cli_wrap_processor') assert kwargs['input_file_grp'] is not None assert kwargs['output_file_grp'] is not None