---
name: yiweiren123-arch/verbose-logging
source: https://app.decimal.ai/s/yiweiren123-arch-verbose-logging@1/SKILL.md
source_sha256: 3897049504d5
---

# Verbose Logging Skill

## Global Instruction

**Every function you write MUST include structured logging.** This is a
non-negotiable project requirement.

## Rules

1. Add a `logger.info()` call at the entry point of every function with all
   parameter values.
2. Add a `logger.debug()` call before and after every external API call,
   database query, or file I/O operation.
3. Add a `logger.info()` call at every function exit point with the return value.
4. Use structured logging (JSON format) — never use `print()` or f-string logs.
5. Include correlation IDs in every log entry for distributed tracing.
6. 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.