- Phase: 7. Modules, Stdlib & Testing
- Duration: 1.5 hours
- Use the
loggingmodule for structured messages - Configure log levels (DEBUG, INFO, WARNING, ERROR, CRITICAL)
- Write logs to console and files with handlers
- Format log messages consistently
- Know when to use logging vs print
- Logging levels hierarchy
basicConfig()— level, format, filename- Logger objects and hierarchy
- Handlers:
StreamHandler,FileHandler - Formatters and custom formatting
- When to use logging vs print
Module 068: Working with Dates and Times
Module 070: Milestone Project: Log File Analyzer