I have a task that does some logging + other actio...
# ask-the-community
a
I have a task that does some logging + other actions, but logs of levels <= INFO are not showing up when running the task 🤔 Anyone have an idea what might be going on?
t
@Archit Rathore You need to set level to INFO, or 20. 0 means "NOTSET" and will delegate to root logger.
(I see you are also wanting DEBUG logging messages, so set to DEBUG, or 10. These are documented here, (or read the code)
g
In the past, I've also had to set the root logger to INFO
Copy code
logging.basicConfig(level=<http://logging.INFO|logging.INFO>)
before setting up your logger
Just tried the above example, and without modifying root, INFO wasn't shown, but after it was
a
Yes, that was it!! (though it works as long as I call
basicConfig
regardless if
force=True
is set or not)
g
Nice! I think we called this out a few months back and someone must have fixed 🚀