mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-09 20:29:55 +02:00
cli: add a --log-level option
This commit is contained in:
parent
ca23b32e9b
commit
70d0b985a9
1 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
import click
|
||||
from ocrd_utils import initLogging
|
||||
from ocrd_utils import initLogging, setOverrideLogLevel
|
||||
from sbb_newspapers_org_image.eynollah import eynollah
|
||||
|
||||
|
||||
|
@ -84,6 +84,12 @@ from sbb_newspapers_org_image.eynollah import eynollah
|
|||
is_flag=True,
|
||||
help="if this parameter set to true, this tool would ignore headers role in reading order",
|
||||
)
|
||||
@click.option(
|
||||
"--log-level",
|
||||
"-l",
|
||||
type=click.Choice(['OFF', 'DEBUG', 'INFO', 'WARN', 'ERROR']),
|
||||
help="Override log level globally to this",
|
||||
)
|
||||
def main(
|
||||
image,
|
||||
out,
|
||||
|
@ -98,7 +104,10 @@ def main(
|
|||
full_layout,
|
||||
allow_scaling,
|
||||
headers_off,
|
||||
log_level
|
||||
):
|
||||
if log_level:
|
||||
setOverrideLogLevel(log_level)
|
||||
initLogging()
|
||||
eynollah(
|
||||
image,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue