Use a named logger per module.
Section: Logging Core Patterns
Create a module logger
python
python
import logging
logger = logging.getLogger(__name__)Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Logging Core Patterns
Include stack info in a log call
Attach the current stack to a log message.
Dump traceback later with faulthandler
Emit stack traces after a timeout to catch hangs.