CLI log-level ignored if config file is present
See original GitHub issueIt seems we were not thorough enough in #599: Currently --log-level
has no effect when some ~/ocrd_logging.conf
is present.
IIUC this is because ocrd_utils.logging.initLogging
comes after setOverrideLoglevel
(so all its logger setLevel
s get wiped out and only global _overrideLogLevel
survives), but logging.config.fileConfig
of course does not honour ocrd_utils.logging.getLogger
’s _overrideLogLevel
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
CLI - Prettier
This command formats all files supported by Prettier in the current directory ... If a config file is found will evaluate it and...
Read more >Command line options - Envoy Proxy
Envoy is driven both by a JSON configuration file as well as a set of command line options. The following are the command...
Read more >config | npm Docs
Run npm config ls -l to see a set of configuration parameters that are internal to npm, and are defaults if nothing else...
Read more >Main configuration file — WirePlumber 0.4.13 documentation
The format of this configuration file is the variant of JSON that is also used in PipeWire ... the module is ignored when...
Read more >Configuring Logging - Quarkus
The default minimum log level for every log category. If no level configuration exists for a given logger category, the enclosing (parent) category...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@M3ssman
Your test is not realistic though. On the CLI, the decorator for
--log-level
kicks in beforeinitLogging
– see above.@kba
Your are missing
keys=root,ocrd
to arm that additional logger!I’m totally aware of stuff like this is hard to catch, but I really like to see a test-fixture setup for this situation that can be integrated into
test_logging.py
even as a sort of regression test and, as first step, to reproduce the mentioned behavior.