logging.basicConfig does nothing because a library configured logging first
Python 3.11. In my script I call logging.basicConfig(level=DEBUG, format='...') at the top, but my logger.debug() calls never show up. If I use logging.getLogger().setLevel(DEBUG) it works but the format is wrong. I think a library I import configures logging before my call. How do I reliably set up logging in a script without fighting whoever imported first? Ideally something that works whether the third-party import happens before or after my setup call, because I've seen it break both ways.
4 replies