Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Application Logging

  • 452 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

application-logging is an agent skill that implements structured JSON logging with correlation IDs and central aggregation for developers who need production-debuggable services.

About

application-logging is a backend observability skill in aj-geddes/useful-ai-prompts for instrumenting services with structured logs, correlation IDs, level discipline, and centralized analysis. The quick-start ships a Winston logger with timestamped JSON formatting, service and environment defaultMeta, console and error.log transports, and guidance on LOG_LEVEL configuration. Six reference guides cover Node.js Winston patterns, Express HTTP request logging, Python structured logging, Flask integration, ELK stack setup, and Logstash configuration. Best-practice rules require request IDs, sensitive-data redaction, rotation, and centralized aggregation while forbidding secret logging and unbounded files. Reach for application-logging when standing up a new API, hardening production debuggability, or migrating from unstructured printf logs to JSON streams compatible with ELK or similar aggregators.

  • Structured JSON logging
  • Correlation and trace IDs
  • Log level strategy
  • PII redaction patterns
  • Centralized aggregation readiness

Application Logging by the numbers

  • 452 all-time installs (skills.sh)
  • Ranked #930 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill application-logging

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs452
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you add structured JSON logging to Node APIs?

Instrument services with structured logs, correlation IDs, log levels, redaction, and aggregation-friendly formats for debugging production incidents.

Who is it for?

Backend developers instrumenting Node.js or Python services who need structured logs, correlation IDs, and ELK-ready aggregation patterns.

Skip if: Teams seeking ML-based outlier scoring on metrics without first establishing structured log pipelines.

When should I use this skill?

User asks to set up structured logging, Winston JSON logs, correlation IDs, ELK stack, or Express/Flask request logging.

What you get

Winston or Python JSON logger setup, Express/Flask request logging middleware, ELK/Logstash configs, and redaction-ready log formats.

  • JSON logger configuration
  • HTTP request logging middleware
  • ELK/Logstash setup references

By the numbers

  • Includes 6 reference guides for Node, Express, Python, Flask, ELK, and Logstash
  • Quick-start Winston logger configures console and error.log file transports
  • Best-practice checklist lists 8 DO rules and 7 DON'T rules for production logging

Files

SKILL.mdMarkdownGitHub ↗

Application Logging

Table of Contents

Overview

Implement comprehensive structured logging with proper levels, context, and centralized aggregation for effective debugging and monitoring.

When to Use

  • Application debugging
  • Audit trail creation
  • Performance analysis
  • Compliance requirements
  • Centralized log aggregation

Quick Start

Minimal working example:

// logger.js
const winston = require("winston");

const logFormat = winston.format.combine(
  winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
  winston.format.errors({ stack: true }),
  winston.format.json(),
);

const logger = winston.createLogger({
  level: process.env.LOG_LEVEL || "info",
  format: logFormat,
  defaultMeta: {
    service: "api-service",
    environment: process.env.NODE_ENV || "development",
  },
  transports: [
    new winston.transports.Console({
      format: winston.format.combine(
        winston.format.colorize(),
        winston.format.simple(),
      ),
    }),
    new winston.transports.File({
      filename: "logs/error.log",
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Node.js Structured Logging with WinstonNode.js Structured Logging with Winston
Express HTTP Request LoggingExpress HTTP Request Logging
Python Structured LoggingPython Structured Logging
Flask IntegrationFlask Integration
ELK Stack SetupELK Stack Setup
Logstash ConfigurationLogstash Configuration

Best Practices

✅ DO

  • Use structured JSON logging
  • Include request IDs for tracing
  • Log at appropriate levels
  • Add context to error logs
  • Implement log rotation
  • Use timestamps consistently
  • Aggregate logs centrally
  • Filter sensitive data

❌ DON'T

  • Log passwords or secrets
  • Log at INFO for every operation
  • Use unstructured messages
  • Ignore log storage limits
  • Skip context information
  • Log to stdout in production
  • Create unbounded log files

Related skills

How it compares

Start with application-logging for log instrumentation and aggregation; add anomaly detection later for ML scoring on metrics derived from those logs.

FAQ

Which runtimes does application-logging cover?

application-logging provides a Winston quick start for Node.js plus six references for Express HTTP logging, Python structured logging, Flask integration, ELK stack setup, and Logstash configuration for centralized analysis.

What logging practices does application-logging require?

application-logging mandates structured JSON logs, request IDs for tracing, appropriate log levels, secret redaction, rotation, consistent timestamps, and centralized aggregation while avoiding password logging and unbounded stdout-only production setups.

Does application-logging include an ELK setup guide?

application-logging links references/elk-stack-setup.md and references/logstash-configuration.md among its six guides, covering ingestion and pipeline configuration after the Winston or Python logger quick start.

Backend & APIsmonitoringinfra

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.