Staring at hundreds of log lines looking for the cause of an incident is painful. Pipe your logs to Claude and get a structured analysis in seconds.
cat storage/logs/laravel.log | claude -p "Summarise the errors in this log.
Group them by type, identify the most frequent issues, and highlight anything
that looks like a cascading failure."
Claude reads the full log and returns a clear breakdown — no more grepping and counting by hand.
For large log files, filter first to keep the context focused:
grep -i "error\|exception\|critical" storage/logs/laravel.log | \
tail -500 | \
claude -p "What are the root causes here? Are these related or independent failures?"
You can also ask Claude to spot anomalies rather than just errors:
cat access.log | claude -p "Are there any unusual request patterns in this log?
Look for things like unusually high request rates from single IPs, unexpected
404 spikes, slow response times, or suspicious user agent strings."
This works just as well with structured JSON logs from tools like Monolog, Winston, or structured logging in Go:
cat app.log | jq 'select(.level == "error")' | claude -p "What's going wrong?"
Logs tell a story — Claude just reads faster than you do.
Log in to leave a comment.
Hand Claude your heap snapshots or server code and ask it to trace memory leaks — it spots missing event listener cleanup, unbounded caches, and stream lifecycle bugs that are easy to miss in code review.
Ask Claude to audit your UI components for WCAG accessibility issues — it catches semantic problems, missing ARIA attributes, and keyboard navigation gaps that automated tools miss.
The --debug flag enables verbose logging for Claude Code, and an optional category filter like "api,mcp" lets you narrow output to exactly the subsystem you need to investigate.