dabydat/alpha-omega/nestjs-logging
Claude Code and agent skill by dabydat/alpha-omega
- community
Checking that the SKILL.md file is still in the repository.
Structured logging patterns for NestJS microservices. Covers correlation ID propagation, Winston configuration, log levels per environment, HTTP middleware vs TCP interceptor patterns, and centralized logging in common_core. Use when setting up logging infrastructure, debugging request flows, or implementing distributed tracing.
Install
npx vskill@latest install dabydat/alpha-omega/nestjs-loggingSKILL.md
Structured Logging for NestJS Microservices
Production logging is not console.log with extra metadata. It is correlation IDs that stitch across services, log levels that adapt per environment, and transports that go beyond stdout.
Production patterns for: HTTP gateways, TCP microservices, event handlers, job processors, and distributed tracing
Agent collaboration: Backend Dev (logger implementation), DevOps (centralized log aggregation), QA Engineer (log-based debugging)
Core Principle: Why Structured Logging
See references/why-structured-logging.md for the INCORRECT vs CORRECT comparison.
Correlation ID Pattern
See references/correlation-id.md for the full implementation and flow.
Flow:
- Incoming request has
x-correlation-idheader? Use it. Otherwise generate UUID. - Attach to request context (request object for HTTP, message payload for TCP).
- Ensure all log calls include it automatically via AsyncLocalStorage.
- Propagate to outgoing requests (HTTP headers, message headers).
Structured Logging with Winston
See references/winston-config.md for full configuration.
Key components: See references/logger-port.md for the LoggerPort interface.
Transport decision:
| Environment | Transport | Format | |
|---|---|---|---|
| Development | Console | Pretty-printed, colorized | |
| Production | JSON (file or remote) | Structured JSON for search/analysis |
Transport-Specific Patterns
HTTP Gateway (REST Controllers)
- Middleware (before handler): see
references/http-middleware.md. - Interceptor (after handler): see
references/http-interceptor.md.
TCP Microservice
See references/tcp-interceptor.md.
Exception Filter Logging
See references/exception-filter-logging.md (log context before responding).
Module Registration
See references/module-registration.md (APP_INTERCEPTOR/APP_FILTER/LOGGER_PORT).
Log Levels
See references/log-levels.md for detailed environment configuration.
| Environment | Level | Sampling | Format | |
|---|---|---|---|---|
| development | debug | none | pretty | |
| staging | info | 50% | json | |
| production | warn | 10% | json |
Quality Checklist
Anti-Patterns
See references/anti-patterns.md for the three ❌ examples (console.log, logging after throw, sensitive data).
Related Skills
nestjs-guards-filters- Exception filters for HTTP error handlingnestjs-event-driven-architecture- Event logging patternsnestjs-cqrs-commands- Command and query loggingnestjs-ddd-patterns- Domain event logging
Security
- Security scanPassed, 98 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/nestjs/nestjs-logging/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dabydat/alpha-omega/nestjs-logging)