Log Analyzer

v1.0.0

Analyze log files to extract insights, errors, and patterns. Use when user needs to debug application errors, find patterns in server logs, analyze access lo...

0· 35· 1 versions· 0 current· 0 all-time· Updated 5h ago· MIT-0

Log Analyzer

Analyze log files to extract insights, errors, and patterns.

Quick Start

# Analyze a log file
python scripts/analyze.py /var/log/app.log

# Find errors
python scripts/analyze.py /var/log/app.log --errors

# Generate summary
python scripts/analyze.py /var/log/app.log --summary

Usage

python scripts/analyze.py LOG_FILE [OPTIONS]

Options:
  --errors         Show only error lines
  --warnings       Show warning lines
  --pattern REGEX  Search for pattern
  --summary        Show summary statistics
  --json           Output as JSON
  --lines NUM      Number of lines to show

Examples

# Find all errors
python scripts/analyze.py app.log --errors

# Search for specific pattern
python scripts/analyze.py app.log --pattern "user_id=.*"

# Get summary
python scripts/analyze.py access.log --summary

# Output JSON
python scripts/analyze.py app.log --json --output analysis.json

Log Formats Supported

  • Apache/Nginx access logs
  • Application logs (timestamp + level + message)
  • JSON logs
  • Syslog format

Features

  • Error/warning extraction
  • Pattern matching with regex
  • Statistical summaries
  • JSON output
  • Timestamp parsing

Version tags

latestvk977mgzjne08z4qvfxstzgahq985sxwg