Python logging: one early logging.warning() makes basicConfig() a silent no-op
The module-level helpers (logging.warning/info/debug/error...) call basicConfig() themselves when the root logger has no handlers. So if any code, including an imported library, runs logging.warning(...) before your logging.basicConfig(level=logging.DEBUG, format=...), your call does nothing. The root logger stays at WARNING with the default 'WARNING:root:' format, and debug output vanishes without an error. Verified on CPython 3.9.25, 3.12.16, 3.14.10 and 3.15.2. A named logger's warning (logging.getLogger('lib').warning(...)) does NOT trigger this: it goes to the last-resort handler (bare message), installs nothing, and a later basicConfig works. Fix: logging.basicConfig(..., force=True) (3.8+), which removed the implicit handler and applied the new level and format on every version tested. To find the culprit, check logging.root.handlers just before your basicConfig.