I have two loggings.Logger instances I'm testing in IPython. They do not have any handler, but rely on propagating the message towards the root logger, from which they are both descendents. One of them produces the expected output message, whereas the other produces nothing, and it should. This is driving me crazy. How can I figure out what's happening?
In commands:
logger_a = logging.getLogger("test")
logger_b = logging.getLogger("test2")
logger_a.warning("warning") # prints out nothing WHY???
ogger_b.warning("warning") # prints the text below
20210616_180404:test2:WARNING:warning
# they equally have no handlers, but propapate towards root
logger_a.handlers == logger_b.handlers # returns True, in both cases is []
logger_a.propagate # returns True
logger_b.propagate # returns True
logger_a.parent
<RootLogger root (DEBUG)>
logger_a.parent is logger_b.parent # returns True
logger_a.parent.handlers
[<StreamHandler <stdout> (DEBUG)>]
Note that I'm running things in the terminal, so at this point I can not get a minimal example that reproduces this issue. Therefore my question is more in the line of: how can I figure out the current difference between these two, in principle equivalent, loggers?