Python Logging Done Right
Updated: November 18, 2026
Still using <code>print()</code> in production? This post breaks down Python's logging stack (logger - handler - formatter), why <code>basicConfig()</code> keeps "not working," and the one-time setup that makes every module's <code>getLogger(__name__)</code> behave. It also covers log levels as a real contract, switching to JSON logs for production, and why tools like Sentry beat grepping at 3 AM. read on »