You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as suggest and the logging in this module is perfectly controllable via the command line.
However in the other module doit the level of the logger is always set to WARNING independent of the used command line option.
Hoe can I use click_log in the second module as well?
The text was updated successfully, but these errors were encountered:
halloleo
changed the title
Hoe can I use click_log in a multiple module project?
How can I use click_log in a project with multiple modules?
Apr 29, 2020
But IIRC the problem is that at this point logging has already been configured. Looking at one of our old applications, we're doing this trick when configuring logging without external tools:
defconfigure_logging(logconfig):
"""Sets up the logging framework according to given logging .INI file"""ifos.path.isfile(logconfig):
# Take over logging configuration. This disables all logging:logging.config.dictConfig({'version': 1})
# Read new logging configuration from an .ini file:logging.config.fileConfig(logconfig, disable_existing_loggers=False)
but I'll have to try out if this approach would work here.
I have a project with two module
cli.py
anddoit.py
.In the main module
cli.py
I useas suggest and the logging in this module is perfectly controllable via the command line.
However in the other module
doit
the level of the logger is always set toWARNING
independent of the used command line option.Hoe can I use click_log in the second module as well?
The text was updated successfully, but these errors were encountered: