Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 708 Bytes

File metadata and controls

29 lines (20 loc) · 708 Bytes

Module 069: Logging

  • Phase: 7. Modules, Stdlib & Testing
  • Duration: 1.5 hours

Learning Objectives

  • Use the logging module 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

Topics Covered

  • Logging levels hierarchy
  • basicConfig() — level, format, filename
  • Logger objects and hierarchy
  • Handlers: StreamHandler, FileHandler
  • Formatters and custom formatting
  • When to use logging vs print

Prerequisites

Module 068: Working with Dates and Times

Next Module

Module 070: Milestone Project: Log File Analyzer