analyze-logs
evlog.dev
Debug application behavior by analyzing structured logs from evlog's file system drain.
What is analyze-logs?
Reads and analyzes NDJSON-formatted wide events from .evlog/logs/ to investigate errors, performance issues, and request patterns. Use when debugging failures, understanding slow endpoints, or answering questions about application behavior.
- Parse structured NDJSON log files organized by date in .evlog/logs/
- Filter events by level, status code, duration, path, or custom application fields
- Identify error patterns, slow requests, and recurring failures across endpoints
- Trace individual requests using requestId to see complete context in a single event
- Extract actionable error details including why failures occurred and suggested fixes
How to install analyze-logs
npx skills add null --skill analyze-logs- evlog file system drain must be enabled in your application (createFsDrain() configured in your framework)
- At least one request must be triggered after drain setup to generate log files
- Log files exist in .evlog/logs/ directory relative to project root
How to use analyze-logs
- 1.Locate the most recent .jsonl file in .evlog/logs/ (files named by date like 2026-03-14.jsonl)
- 2.Read the file and parse each line as a separate JSON object (NDJSON format by default)
- 3.Filter events based on your question: level, status, duration, path, or custom fields
- 4.For errors, examine error.message, error.data.why, and error.data.fix fields
- 5.Analyze patterns by grouping events and comparing metrics across endpoints or time ranges
Use cases
- Debug a specific error by finding matching log entries and reading error.message, error.data.why, and stack traces
- Investigate slow endpoints by filtering requests with duration > 1000ms and sorting by performance
- Analyze error rates per endpoint by grouping events by path and comparing error vs total counts
- Trace client-side issues by filtering source==='client' and comparing with server-side errors
- Review application behavior patterns by examining timestamps, request paths, and business context fields
- Backend developers debugging production or development errors
- DevOps engineers investigating performance degradation and error rates
- Full-stack developers analyzing client vs server-side failures
- QA engineers understanding application behavior during testing
analyze-logs FAQ
In .evlog/logs/ relative to your project root, organized as .jsonl files named by date (e.g., 2026-03-14.jsonl). For monorepos, also check apps/*/.evlog/logs/.
The file system drain may not be enabled. Configure createFsDrain() in your framework's evlog setup, then trigger some requests to generate logs.
Filter events by requestId to get a single wide event containing all context for that request, or filter by path and timestamp to narrow results.
Parse the duration field (e.g., '706ms'), extract the numeric value, and filter for requests exceeding your threshold (e.g., > 1000ms).
NDJSON (default) is one compact JSON object per line. Pretty format is multi-line indented JSON. Check the first few bytes of the file to detect which format is used.
Full instructions (SKILL.md)
Source of truth, from evlog.dev.
name: analyze-logs description: Analyze application logs from the .evlog/logs/ directory. Use when debugging errors, investigating slow requests, understanding request patterns, or answering questions about application behavior. Reads structured NDJSON wide events written by evlog's file system drain. license: MIT metadata: author: HugoRCD version: "0.1"
Analyze application logs
Read and analyze structured wide-event logs from the local .evlog/logs/ directory to debug errors, investigate performance issues, and understand application behavior.
When to Use
- User asks to debug an error, investigate a bug, or understand why something failed
- User asks about request patterns, slow endpoints, or error rates
- User asks "what happened" or "what's going on" with their application
- User asks to analyze logs, check recent errors, or review application behavior
- User mentions a specific error message or status code they're seeing
Finding the logs
Logs are written by evlog's file system drain as .jsonl files, organized by date.
Format detection: The drain supports two modes:
- NDJSON (default,
pretty: false): One compact JSON object per line. Parse line-by-line. - Pretty (
pretty: true): Multi-line indented JSON per event. Parse by reading the entire file and splitting on top-level objects (e.g.JSON.parse('[' + content.replace(/\}\n\{/g, '},{') + ']')) or use a streaming JSON parser.
Always check the first few bytes of the file to detect the format: if the second character is a newline or ", it's NDJSON; if it's a space or newline followed by spaces, it's pretty-printed.
Search order — check these locations relative to the project root:
.evlog/logs/(default)- Any
.evlog/logs/inside app directories (monorepos:apps/*/.evlog/logs/)
Use glob to find log files:
.evlog/logs/*.jsonl
*/.evlog/logs/*.jsonl
apps/*/.evlog/logs/*.jsonl
Files are named by date: 2026-03-14.jsonl. Start with the most recent file.
If no logs are found
The file system drain may not be enabled. Guide the user to set it up:
import { createFsDrain } from 'evlog/fs'
// Nuxt / Nitro: server/plugins/evlog-drain.ts
export default defineNitroPlugin((nitroApp) => {
nitroApp.hooks.hook('evlog:drain', createFsDrain())
})
// Hono / Express / Elysia: pass in middleware options
app.use(evlog({ drain: createFsDrain() }))
// Fastify: pass in plugin options
await app.register(evlog, { drain: createFsDrain() })
// NestJS: pass in module options
EvlogModule.forRoot({ drain: createFsDrain() })
// Standalone: pass to initLogger
initLogger({ drain: createFsDrain() })
After setup, the user needs to trigger some requests to generate logs, then re-analyze.
Log format
Each line is a self-contained JSON object (wide event). Key fields:
| Field | Type | Description |
|---|---|---|
timestamp | string | ISO 8601 timestamp |
level | string | info, warn, error, debug |
service | string | Service name |
environment | string | development, production, etc. |
method | string | HTTP method (GET, POST, etc.) |
path | string | Request path (/api/checkout) |
status | number | HTTP response status code |
duration | string | Request duration ("234ms") |
requestId | string | Unique request identifier |
error | object | Error details: name, message, stack, statusCode, data |
error.data.why | string | Human-readable explanation of what went wrong |
error.data.fix | string | Suggested fix for the error |
source | string | client for browser logs, absent for server logs |
userAgent | object | Parsed browser/OS/device info |
All other fields are application-specific context added via log.set() (e.g. user, cart, payment).
How to analyze
Step 1: Read the most recent log file
Read the latest .jsonl file. Each line is one JSON event. Parse each line independently.
Step 2: Identify the relevant events
Filter based on the user's question:
- Errors: look for
"level":"error"orstatus >= 400 - Specific endpoint: match on
path - Slow requests: parse
duration(e.g."706ms") and filter high values - Specific user/action: match on application-specific fields
- Client-side issues: filter by
"source":"client" - Time range: compare
timestampvalues
Step 3: Analyze and explain
For each relevant event:
- What happened: summarize the
path,method,status,level - Why it failed (errors): read
error.message,error.data.why, and the stack trace - How to fix: check
error.data.fixfor suggested remediation - Context: examine application-specific fields for business context (user info, payment details, etc.)
- Patterns: look for recurring errors, degrading performance, or correlated failures
Analysis patterns
Find all errors
Filter: level === "error"
Group by: error.message or path
Look for: recurring patterns, common failure modes
Find slow requests
Filter: parse duration string, compare > threshold (e.g. 1000ms)
Sort by: duration descending
Look for: specific endpoints, time-of-day patterns
Trace a specific request
Filter: requestId === "the-request-id"
Result: single wide event with all context for that request
Error rate by endpoint
Group events by: path
Count: total events vs error events per path
Look for: endpoints with high error ratios
Client vs server errors
Split by: source === "client" vs no source field
Compare: error patterns between client and server
Look for: client errors that don't have corresponding server errors (network issues)
Important notes
- Each line is a complete, self-contained event. Unlike traditional logs, you don't need to correlate multiple lines — one line has all the context for one request.
- The
error.data.whyanderror.data.fixfields are evlog-specific structured error fields. When present, they provide the most actionable information. - Duration values are strings with units (e.g.
"706ms"). Parse the numeric part for comparisons. - Events with
"source":"client"originated from browser-side logging and were sent to the server via the transport endpoint. - Log files are
.gitignore'd automatically — they exist only on the local machine or server where the app runs.
Related skills
More from evlog.dev and the wider catalog.
review-logging-patterns
Review and refactor logging patterns; adopt structured evlog for TypeScript/JavaScript projects.

langgraph-code-review
Reviews LangGraph code for bugs, anti-patterns, and improvements. Use when reviewing code that uses StateGraph, nodes, edges, checkpointing, or other LangGraph features. Catches common mistakes in state management, graph structure, and async patterns.

python-code-review
Reviews Python code for type safety, async patterns, error handling, and common mistakes. Use when reviewing .py files, checking type hints, async/await usage, or exception handling.

react-flow
React Flow (@xyflow/react) for workflow visualization with custom nodes and edges. Use when building graph visualizations, creating custom workflow nodes, implementing edge labels, or controlling viewport. Triggers on ReactFlow, @xyflow/react, Handle, NodeProps, EdgeProps, useReactFlow, fitView.

tailwind-v4
Tailwind CSS v4 with CSS-first configuration and design tokens. Use when setting up Tailwind v4, defining theme variables, using OKLCH colors, or configuring dark mode. Triggers on @theme, @tailwindcss/vite, oklch, CSS variables, --color-, tailwind v4.

add-app-clip
Add an iOS App Clip target to an Expo app for lightweight URL-invoked experiences.