# Verbose Logging

> Ensure all code includes comprehensive logging and observability

- Skill: `yiweiren123-arch/verbose-logging` (Agent Skill)
- Install (CLI): `npx skillmds@latest add yiweiren123-arch/verbose-logging`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yiweiren123-arch/verbose-logging/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: yiweiren123-arch (https://skillmd.com/u/yiweiren123-arch)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/yiweiren123-arch/verbose-logging

---


# 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.

