Log Analyzer

v1.0.0

Analyze log files to detect error patterns, aggregate by severity, group repeated errors by fingerprint, and flag anomaly time windows. Use when asked to ana...

0· 279· 1 versions· 1 current· 1 all-time· Updated 10h ago· MIT-0
byJohn Wang@johnnywang2001

Install

openclaw skills install jrv-log-analyzer

Log Analyzer

Analyze any text-based log file for error patterns, severity breakdown, and anomaly detection.

Quick Start

python3 scripts/analyze_logs.py <logfile>
python3 scripts/analyze_logs.py app.log --top 20 --severity ERROR
python3 scripts/analyze_logs.py server.log --json --since "2026-03-01"

Features

  • Severity classification — auto-detects FATAL, ERROR, WARN, INFO, DEBUG from log lines
  • Error fingerprinting — groups similar errors by stripping variable parts (IPs, UUIDs, PIDs, timestamps)
  • Anomaly detection — flags hours with error rates >2x the average
  • Timestamp parsing — handles ISO 8601, syslog, and nginx/apache formats
  • Flexible output — human-readable report or --json for piping

Options

FlagDescription
--top NNumber of top error patterns (default: 15)
--severity LEVELMinimum severity filter (FATAL, ERROR, WARN, INFO, DEBUG)
--jsonOutput structured JSON
--since TIMESTAMPOnly analyze lines after this timestamp

Workflow

  1. Run the analyzer on the target log file
  2. Review severity breakdown for overall health
  3. Check top error patterns for recurring issues
  4. Look at anomaly hours for incident windows
  5. Use --json output to feed into other tools or reports

Version tags

latestvk971frsxq2znfehwq85prs73kd82mw1y