logging

Enforce JSON-serializable structured logging with contextual fields across a monorepo.

2|1|Updated Dec 9, 2025
One-click install
npx skills add https://github.com/ninjasitm/ai-assisted-dev-toolkit --skill logging-ninjasitm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging
Source: https://github.com/ninjasitm/ai-assisted-dev-toolkit/tree/main/src/monorepo/.agents/skills/logging
Command: npx skills add https://github.com/ninjasitm/ai-assisted-dev-toolkit --skill logging-ninjasitm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures consistent, structured logging across a codebase to improve observability, troubleshooting, and operational insights.

Core Features & Use Cases

  • Structured Logging: Enforce JSON-serializable logs for reliable querying and cross-service correlation.
  • Contextual Information: Include request IDs, user IDs, session IDs, and trace context in every log for end-to-end visibility.
  • Observability Guidance: Provide patterns for log levels, message formats, and OpenTelemetry integration across apps, packages, and services.

Quick Start

Configure a shared logging baseline and enable structured logs with contextual fields across all services.

Frequently Asked Questions about logging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce structured logging across a monorepo?

To enforce structured logging across a monorepo, configure a centralized base formatter that outputs JSON-serializable logs and mandates contextual fields like requestId and userId for all services and packages.

What is the best way to add contextual data to application logs for observability?

The best way to add contextual data for observability is injecting fields like requestId, userId, and sessionId into a centralized base formatter, ensuring every log entry contains end-to-end trace context for reliable querying.

Can I standardize log levels and sensitive data masking across multiple services?

Yes, you can standardize log levels and sensitive data masking across multiple services by applying a shared logging baseline with a centralized formatter that includes guidance for masking contextual fields.

Does structured logging work with OpenTelemetry integration in a monorepo?

Structured logging works with OpenTelemetry integration by including trace context in every JSON-serializable log entry, providing end-to-end visibility and cross-service correlation across apps and packages in the monorepo.

Why do I need JSON-serializable logs for troubleshooting?

You need JSON-serializable logs for troubleshooting because they enable reliable querying and cross-service correlation, allowing you to filter and analyze contextual data like request IDs across distributed systems efficiently.