When you're staring at a wall of application logs trying to figure out why something broke at 3am, this walks you through structured logging patterns that actually parse well. It covers when to use different log levels, setting up JSON formatted logs for tools like Elasticsearch, and includes practical query examples for common debugging scenarios. The emphasis on structured over unstructured logging is spot on, because grep only gets you so far when you need to correlate events across distributed services. Includes references for log aggregation tools and patterns for security incidents, performance issues, and user action auditing.

skills.sh installs
674
GitHub stars
379
last updated
Aug 21, 2026

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill log-analysis --agent claude-code

Installs into .claude/skills of the current project.

Files

Log Analysis

Table of Contents

Overview

Logs are critical for debugging and monitoring. Effective log analysis quickly identifies issues and enables root cause analysis.

When to Use

  • Troubleshooting errors
  • Performance investigation
  • Security incident analysis
  • Auditing user actions
  • Monitoring application health

Quick Start

Minimal working example:

// Good: Structured logs (machine-readable)
logger.info({
  level: 'INFO',
  timestamp: '2024-01-15T10:30:00Z',
  service: 'auth-service',
  user_id: '12345',
  action: 'user_login',
  status: 'success',
  duration_ms: 150,
  ip_address: '192.168.1.1'
});

// Bad: Unstructured logs (hard to parse)
console.log('User 12345 logged in successfully in 150ms from 192.168.1.1');

Sponsors

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
DevOps & CI/CD, AI & Agent Building, Debugging
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258
1mohitmishra786 avatarebpfmohitmishra786/low-level-dev-skillseBPF skill for Linux observability and networking. Use when writing eBPF programs with libbpf or bpftrace, attaching kprobes/tracepoints/XDP hooks, debugging ve672skills.sh installs
2syncfusion avatarsyncfusion-react-linear-gaugesyncfusion/react-ui-components-skillsImplement Syncfusion React Linear Gauge for displaying measurements on a linear scale. Use this skill when users need temperature sensors, KPI indicators, progr672skills.sh installs
3joellewis avatarfee-billingjoellewis/finance_skillsBuild and manage advisory fee billing operations from fee schedule design through calculation, collection, revenue recognition, and compliance disclosure. Use w671skills.sh installs
4hyperb1iss avatarorchestratehyperb1iss/hyperskillsUse this skill when orchestrating multi-agent work at scale - research swarms, parallel feature builds, wave-based dispatch, build-review-fix pipelines, or any 669skills.sh installs
5janjaszczak avatarvanilla-webjanjaszczak/cursorBuild or modify plain HTML/CSS/JavaScript (no framework) using modular ES modules (ESM), SRP, minimal global state, and shippable runnable files with lightweigh669skills.sh installs
6product-on-purpose avatartool-design-sprint-decide-and-storyboardproduct-on-purpose/pm-skillsDay 3 (Wednesday) move of a Design Sprint that runs the art museum layout, heat map, speed critique, straw poll, Decider supervote, rumble-vs-all-in-one decisio666skills.sh installs