I'm unable to set my logger to the correct level in python. According to this geeksforgeeks post, the following script should print all logging statements to the console, but it only prints the warning.
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
# Should pring everything
logger.debug("debug")
logger.info("info")
logger.warning("warning") # only prints this
but the output is only
warning
I am thoroughly confused, especially because my script was working as expected yesterday. Nothing in other similar posts has worked yet. Can anyone explain this odd behaviour?
Executed with Python version 3.9.5