Python: Logging with the logging Module

Wishlist Share

About Course

Replace scattered print() calls with proper logging. Learn the five standard log levels, how to create a logger for each module, how to send messages to the console and to files, and how to record exceptions with full tracebacks.

Tutwoo is an independent learning provider. This course is general training based on the official Python documentation. It is not produced or endorsed by the Python Software Foundation and is not an accredited qualification.

© 2026 Tutwoo UK Limited. This course was created in-house by Tutwoo and is our original work. It is for your own learning only: please do not copy, share, record or resell it.

What Will You Learn?

  • Choose the right log level for each message
  • Set up logging with basicConfig, handlers and formatters
  • Use one logger per module with getLogger(__name__)
  • Record errors and tracebacks in a way that helps troubleshooting

Course Content

Course Lessons

  • Why log, and the five log levels
  • Configuring logging: basicConfig, loggers and formats
  • Logging exceptions and good practice

Sources & Further Reading
The official guidance this course is based on.

Final Assessment

Student Ratings & Reviews

No Review Yet
No Review Yet

Want to receive push notifications for all major on-site activities?

✕