The first log analysis platform built specifically for AI-powered development workflows.
LogHawk eliminates the painful cycle of manual log hunting that breaks AI-assisted development flow. Instead of copy/pasting logs for 5+ minutes per AI interaction, your AI agent can directly fetch structured, filtered logs in one API call.
Every AI developer knows this workflow:
- AI Agent: "Check your logs for errors"
- You: grep, copy/paste, screenshot console, repeat...
- AI Agent: "I need backend logs too"
- You: More terminal work, more copy/paste...
This cycle kills productivity. LogHawk makes AI agents truly autonomous by providing direct API access to intelligently filtered logs.
git clone https://github.com/yourusername/LogHawk
cd LogHawk
pip install -r requirements.txt
playwright install chromium # CRITICAL - Browser automationpython run_loghawk.py
# π HTTP: http://127.0.0.1:8765 β
(Recommended - Works with all tools)
# π HTTPS: https://127.0.0.1:8766 β οΈ (Self-signed cert - Limited compatibility)For Claude Code users:
- Add
loghawk_claude.xmlto your workspace - Ask: "Use LogHawk to analyze my logs"
- Claude automatically runs:
curl "http://127.0.0.1:8765/api/logs?preset=full_stack_web"
For other AI tools:
curl "http://127.0.0.1:8765/api/logs?preset=react_debugging"python test_install.py # Comprehensive installation check# Install Python 3.8+ from python.org
pip install -r requirements.txt
playwright install chromium
python run_loghawk.pybrew install python@3.11
pip3 install -r requirements.txt
playwright install chromium
python3 run_loghawk.py# Ubuntu/Debian
sudo apt update && sudo apt install python3 python3-pip
pip3 install -r requirements.txt
playwright install chromium
python3 run_loghawk.py
# Red Hat/CentOS/Fedora
sudo dnf install python3 python3-pip
pip3 install -r requirements.txt
playwright install chromium
python3 run_loghawk.pyLogHawk includes comprehensive Claude Code integration via loghawk_claude.xml:
- Add Integration File: Place
loghawk_claude.xmlin your Claude Code workspace - Natural Language: Ask "Use LogHawk to analyze my application logs"
- Automatic API Calls: Claude automatically fetches filtered logs with optimal parameters
- Structured Analysis: Receives JSON responses designed for AI consumption
You: "My React app is crashing on user interactions"
Claude Code: [Uses LogHawk integration]
Claude: "I found 3 issues in your logs:
1. useState hook error in UserProfile.jsx:47
2. Failed API call to /api/users (CORS issue)
3. Unhandled click event on submit button
Let me fix these..."
Before LogHawk: 5+ minutes of manual log hunting per AI interaction
With LogHawk: AI gets full context in 1 API call
- π§ AI-Native Design - Direct API access with structured JSON responses
- π― Smart Presets -
react_debugging,api_testing,full_stack_web,infrastructure_monitoring - π Multi-Technology - 197+ keywords across React, Python, Java, Node.js, Go, Infrastructure
- π Real-Time Browser Capture - Playwright integration for live frontend debugging
- π Professional UI - Dark/light themes with GitHub-inspired design
- π·οΈ Interactive Filtering - Visual filter badges with one-click removal
- π‘ RESTful API - Complete programmatic access for automation
- π₯οΈ Cross-Platform - Windows, macOS, Linux support
Open http://127.0.0.1:8765 in your browser for the full-featured LogHawk interface:
- π Theme Toggle: Switch between dark and light modes with persistence
- π·οΈ Active Filter Badges: Visual display of applied filters with one-click removal
- π Quick Presets: Debug User Clicks, React Debugging, API Testing, Full Stack Web, Infrastructure
- π Filter Categories: 8 comprehensive technology-specific filter groups with modern accordion design
- π― Custom Keywords: Add your own patterns with regex support (enabled by default)
- π Folder Browser: Visual directory selection with enhanced UI
- β‘ Real-time Analysis: Live filtering with professional log display and syntax highlighting
# Basic usage
curl "http://127.0.0.1:8765/api/logs"
# With technology filters
curl "http://127.0.0.1:8765/api/logs?categories=frontend_react,user_interactions&max_lines=1000"
# With custom keywords and regex
curl "http://127.0.0.1:8765/api/logs?custom_keywords=click.*button,form.*submit&use_regex=true"
# Using presets
curl "http://127.0.0.1:8765/api/logs?preset=react_debugging"# Backend logs only
curl "http://127.0.0.1:8765/api/logs/backend?categories=backend_python"
# Frontend logs only
curl "http://127.0.0.1:8765/api/logs/frontend?categories=frontend_react"LogHawk features a modern, developer-centric interface designed for extended use:
- GitHub-Inspired Theme: Professional dark interface reducing eye strain
- Light Theme Alternative: Clean, accessible light mode for different preferences
- Theme Persistence: Your preference saved in browser localStorage
- System Integration: Respects
prefers-color-schememedia queries
- Active Filter Badges: See all applied filters at a glance with individual removal
- Real-time Updates: Filter changes reflected immediately across the interface
- Category Indicators: Count of selected keywords per technology group
- Preset Highlighting: Clear visual feedback for active configurations
- Card-Based Layout: Modern design with subtle shadows and hover effects
- Professional Typography: Improved font stacks and visual hierarchy
- Color-Coded Elements: Log levels and interface elements use semantic colors
- Responsive Design: Optimized for both desktop and mobile use
- Accessibility First: Full keyboard navigation and screen reader support
- π΄ Core Log Levels - FATAL, ERROR, WARNING, INFO, DEBUG, TRACE
- π User Interactions - clicks, navigation, forms, DOM events
- βοΈ Frontend React/JS/TS - hooks, components, browser errors
- π Backend Python - exceptions, frameworks (Django, Flask, FastAPI)
- β Backend Java/Spring - common Java patterns and Spring errors
- π’ Backend Node.js - Node-specific errors and frameworks
- βοΈ Other Languages - C#, PHP, Go patterns
- ποΈ Infrastructure - Docker, Kubernetes, databases, caching
- Debug User Clicks - Focus on user interaction events and navigation
- React Debugging - Frontend React development issues
- API Testing - Backend API and request/response issues
- Full Stack Web - Combined frontend + backend debugging
- Infrastructure - DevOps and system-level monitoring
Capture real-time browser logs while testing your application:
# Start interactive browser session
python run_playwright.py --url https://yourapp.com
# Headless capture
python run_playwright.py --headless --url https://yourapp.comBrowser logs are automatically saved to browser_logs/ and integrated with LogHawk analysis.
LogHawk is optimized for AI-powered log analysis:
IMPORTANT: Claude Code's WebFetch tool has SSL compatibility issues:
- HTTP URLs: Auto-upgraded to HTTPS, causing protocol mismatch
- HTTPS URLs: Rejects self-signed certificates
# Use Bash tool with curl (WORKS PERFECTLY)
curl "http://127.0.0.1:8765/api/logs?preset=full_stack_web&max_lines=2000"
# Or use browser directly
# Open: http://127.0.0.1:8765Use the built-in port management utility:
# Check LogHawk server status
python kill_ports.py status
# Start LogHawk server
python kill_ports.py start
# Restart LogHawk server
python kill_ports.py restart
# Force kill processes on port 8765
python kill_ports.py kill --forcemax_files- Number of recent log files to scan (default: 3, max: 20)max_lines- Maximum lines to return (default: 1000, 0=unlimited)categories- Comma-separated filter categoriescustom_keywords- Comma-separated custom patternspreset- Quick preset configurationuse_regex- Enable regex pattern matching
LogHawk automatically detects and filters important log levels:
- Standard levels: WARNING, ERROR, CRITICAL, FATAL
- Exception patterns: Exception, Traceback, Stack traces
- Technology-specific patterns: 100+ predefined keywords
- File types:
.log,.txt,.jsonfiles - Sorting: By modification time (newest first)
Solution: Install system dependencies first
# Ubuntu/Debian
sudo apt-get install -y wget ca-certificates fonts-liberation libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6
# macOS
brew install --cask microsoft-edge # Alternative browser optionpip3 install --user -r requirements.txt # Install to user directory
python3 -m playwright install chromium # Use module syntaxLogHawk requires Python 3.8+. Check with: python --version
# Install newer Python:
# Ubuntu: sudo apt install python3.11
# macOS: brew install python@3.11
# Windows: Download from python.orgβ "Connection refused" at http://127.0.0.1:8765
Solutions:
- Start the server:
python run_loghawk.py - Check ports:
python kill_ports.py status - Force restart:
python kill_ports.py restart - Try different port: Edit
log_server.pyline withport=8765
Check log paths:
curl "http://127.0.0.1:8765/api/paths" # View current paths
curl -X POST "http://127.0.0.1:8765/api/paths" -d "backend=./your_logs_folder"Use HTTP instead: http://127.0.0.1:8765 (recommended for AI tools)
# If you need HTTPS, regenerate certificates:
cd ssl/
openssl req -x509 -newkey rsa:4096 -keyout loghawk-key.pem -out loghawk-cert.pem -days 365 -nodesSolution: Use curl instead of WebFetch
# Add to Claude Code instructions:
curl "http://127.0.0.1:8765/api/logs?preset=full_stack_web"Try broader filters:
curl "http://127.0.0.1:8765/api/logs?categories=core_levels&max_lines=0"- Install Python from python.org
- Check "Add Python to PATH" during installation
- Use
pyinstead ofpython:py run_loghawk.py
/Applications/Python\ 3.x/Install\ Certificates.command # Run Python's cert installerexport DISPLAY=:99 # Set virtual display
Xvfb :99 -screen 0 1024x768x24 & # Start virtual framebuffer- Reduce file scope:
max_files=1for recent logs only - Limit lines:
max_lines=500for quick analysis - Use presets: More efficient than manual category combinations
- Specific keywords:
error,timeoutinstead of broad regex patterns
- Run diagnostics:
python test_install.py - Check server status:
python kill_ports.py status - Review logs: Check console output when starting
python run_loghawk.py - GitHub Issues: Report bugs with diagnostic output
Cross-Platform Technology Stack:
- FastAPI - High-performance async web framework (Python 3.8+)
- Uvicorn - Production ASGI server with SSL support
- Playwright - Cross-platform browser automation (Chromium)
- Modern CSS - Custom properties for smooth dark/light themes
- Vanilla JavaScript - Event-driven UI with zero dependencies
- RESTful Design - JSON APIs optimized for AI consumption
MIT License - Built for developers, by developers.
LogHawk - Advanced Multi-Technology Log Analysis Platform
π¦
Soaring above your logs, spotting issues with precision