Really good logging
summary
Explains concrete setups: use levels (debug/info/warning/error/critical with numeric scores), attach multiple handlers (console, file, SMTPHandler emails tracebacks), formatters with timestamp/process/file/line, and use RotatingFileHandler with maxBytes and backupCount to cap temp logs. Shows code, config files, and dict-based logging, uses package_resources to ship configs, and wires sys.excepthook to log uncaught exceptions (or logging.exception with exc_info=True). Mentions Graylog2/GELF and syslog, and using logrotate to rotate on disk; examples all run and produce emails and rotated files.
AI-written summary · about
chapters (18)
- 0:00Logging basics
- 1:36Basic configuration
- 3:53File handling
- 6:00Advanced logging setup
- 10:25Formatters and handlers
- 14:21Email notifications
- 20:29Configuration methods
- 27:02YAML configuration
- 30:07Exception handling
- 33:22Logging uncaught exceptions
- 35:21Logger hierarchies
- 38:22Advanced file rotation
- 42:24Logging filters
- 45:08Debugging stack traces
- 46:06Log rotation strategies
- 46:55Centralized logging
- 48:48Security and best practices
- 51:24Closing Q&A








