question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bashlib: Pass log level to ocrd calls and add command to log spec-conformant

See original GitHub issue

E.g.

$ocrd-olena-binarize -l WARN -I MAX -O WOLF,WOLF-IMG -m mets.xml -p '{"impl":"wolf"}'
12:32:31.776 INFO ocrd.workspace - Saving mets '/data/2019-12-04/mets.xml'

That should not log. Whereas -L DEBUG should log more verbose.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kbacommented, Dec 4, 2019

you’d need to wrap these as additional ocrd bashlib commands.

That would not be a problem IMHO.

I’d rather we actually delegated all these things to the Python implementation.

True. I haven’t forgotten about #353 either.

1reaction
kbacommented, Dec 4, 2019

support setting a loglevel override via environment variable in ocrd_utils

You’re right being not right initially. Or something. Anyway, it’s a good idea, let’s do that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logging HOWTO — Python 3.11.1 documentation
Logging is a means of tracking events that happen when some software runs. The software's developer adds logging calls to their code to...
Read more >
how to set logging level from command line - Stack Overflow
The level should be a variable from logging not a string, logging. ... representation as well and you can just pass in 'DEBUG'...
Read more >
Simple logging - EF Core | Microsoft Learn
Logging from an EF Core DbContext using LogTo. ... LogTo can be passed a higher minimum level to filter out some messages.
Read more >
Python Logging Guide - Best Practices and Hands-on Examples
Line 1: import the logging module. Line 2: create a basicConf function and pass some arguments to create the log file. In this...
Read more >
How to manage logging — pytest documentation
pytest captures log messages of level WARNING or above automatically and displays them in their own section for each failed test in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found