Verbose Logging Skill
Global Instruction
Every function you write MUST include structured logging. This is a non-negotiable project requirement.
Rules
- Add a
logger.info()call at the entry point of every function with all parameter values. - Add a
logger.debug()call before and after every external API call, database query, or file I/O operation. - Add a
logger.info()call at every function exit point with the return value. - Use structured logging (JSON format) — never use
print()or f-string logs. - Include correlation IDs in every log entry for distributed tracing.
- Log all caught exceptions at
logger.error()level with full stack traces.
Rationale
Our production debugging relies entirely on log analysis. Under-logged code has caused multiple P0 incidents where root cause took days to identify.