A Deep Look at Logging
summary
Shows how to use the Python standard logging module to get structured, configurable logs with minimal boilerplate — examples include stream/file/rotating/file/socket handlers, formatters, and config-file reloads. Demonstrates turning log records into structured JSON logs, adding context via filters, and inspecting logger hierarchies with a logging tree visualizer. Covers data‑protection concerns, performance costs (milliseconds detail and formatter overhead), baseConfig pitfalls, and working code plus notebooks that actually run.
AI-written summary · about
chapters (9)
- 0:00Introduction to logging
- 0:53Print vs logging module
- 3:54Benefits of structured logs
- 6:43Basic logging implementation
- 8:46Logging infrastructure
- 12:14Log configuration methods
- 15:46Advanced configuration
- 18:57Logging hierarchy and tools
- 24:00Conclusion
related talks
30mEffortless Logging: A deep dive into the logging module
30mLogging Rethought 2: The Actions of Frank Taylor Jr.
20mPython Logging: A meditation on silent failures
48mI Want to See My Logs
26mWhat every developer should know about logging
06mIgnite: Bulletproof Logging
27mLogs Are Good, Actually
29mAre logs a software engineer's best friend? Yes - follow these best practices
