forge-logging

Convert application logs into structured JSON events with correlation IDs and redaction.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/f4rkh4d/forge-skill --skill forge-logging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forge-logging
Source: https://github.com/f4rkh4d/forge-skill/tree/main/skills/backend/forge-logging
Command: npx skills add https://github.com/f4rkh4d/forge-skill --skill forge-logging

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Most application logging is unreliable for incident response: it lacks structure, correlation IDs, consistent event names, and often leaks secrets, making failures hard to reproduce and analyze.

Core Features & Use Cases

  • Structured JSON-first logging: Ensure every log line is a parseable JSON object suitable for log aggregation, filtering, and alerting.
  • Correlation and tracing: Attach request_id (and trace_id/span_id where applicable) so logs can be tied to a single request path across services.
  • Redaction and safe error handling: Redact secrets at the logger so Authorization tokens and credential-like strings never reach storage, and log errors with full error objects and correct severity boundaries.
  • Use case: When adding or refactoring logging in a backend service, ensure logs support on-call debugging, audits/retention separation, and verifier-enforced discipline against unsafe patterns like console.log or templated messages.

Quick Start

Use the forge-logging skill to enforce structured JSON logging with request correlation IDs and redaction for any backend service codebase.

Frequently Asked Questions about forge-logging

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

FAQPage Schema
How do I make application logs structured JSON with request correlation IDs?

Structured JSON logging converts unstructured application logs into parseable JSON objects, attaching request_id and trace_id to tie logs to a single request path across services. This ensures each log line is correlatable, correctly leveled, and safe for aggregation pipelines.

How do I redact secrets and Authorization tokens from backend service logs?

Redact secrets at the logger so Authorization tokens and credential-like strings never reach storage. This structured logging discipline prevents secret-leaking application logs by enforcing source redaction before logs are written to aggregation pipelines.

What is the best way to enforce consistent logging levels and event names for oncall debugging?

Enforcing required fields like timestamp, level, message, and service alongside stable message strings ensures reliable JSON log events for oncall debugging. Environment-controlled log levels maintain correct severity boundaries for incident response.

Does structured logging work for background jobs and scheduled tasks?

Structured logging works for HTTP services, background jobs, and scheduled tasks by applying standardized logging discipline. Each log line becomes a correlatable JSON object suitable for filtering, alerting, and incident debugging across different execution contexts.

Why do I need to separate audit logs from regular application logs?

Separating audit logs from regular application logs ensures distinct retention policies and security handling. This structured logging discipline creates reliable JSON log events specifically for audits, keeping them isolated from general incident debugging logs.

How do I stop console.log and templated messages from breaking log aggregation pipelines?

Enforce verifier-enforced discipline against unsafe patterns like console.log or templated messages to ensure logs support aggregation pipelines. Standardized structured JSON logging replaces unstructured outputs with parseable, correlatable JSON log events.