Skip to content

Logging and debugging

This guide covers making Python programs observable — the logging module, log levels, handlers, formats — and debugging them with pdb and breakpoints.

Coming soon

This guide is awaiting migration into Agilearn. The archived version remains available at accuser.dev/logging-and-debugging-with-python.

What will be here

Learn — your first log message, log levels and formatting, logging to files, debugging with pdb.

Recipes — configuring logging for a project, custom log handlers, effective breakpoints, avoiding common mistakes.

Referencelogging module, log format directives, pdb commands.

Concepts — understanding log levels; why logging not print.