Log-Lens is a high-performance, zero-dependency log analysis dashboard designed to help developers troubleshoot system crashes quickly and efficiently. Built entirely in Python using Streamlit, Pandas, and Plotly, it provides powerful parsing and visualization tools without requiring external AI APIs.
- Smart File Ingestion: Drag-and-drop uploader supporting
.log,.txt, and.csvformats. - Auto-Parsing: Built-in Regex engine automatically extracts
Timestamp,Level, andMessagefrom raw log lines. - Diagnostic Dashboard:
- High-level KPI Metrics (Total logs, Total errors, Most frequent errors).
- Interactive Plotly Error Heatmap showing log frequency over time, color-coded by severity.
- Advanced Triage Tools:
- Deduplication: "Cluster Similar Errors" feature groups repeating logs (e.g., masking UUIDs, IPs, and Hex values) to reduce noise.
- Live Filtering: Sidebar multi-select for Log Levels and an interactive Date/Time range slider.
- Search: Deep-dive search bar supporting both plain text and Regex patterns.
- Utility & Export: Clean data tables with "ERROR" row syntax highlighting and 1-click CSV export functionality.
- Terminal Aesthetic: Custom dark-mode Streamlit theme optimized for performance on large files.
- Upload Logs: Drag and drop any
.log,.txt, or.csvfile into the sidebar uploader. (Sample logs are provided in thetest_logs/folder!) - Filter Data: Use the Log Level checkboxes or the interactive Date/Time slider to narrow down the timeframe.
- Regex Search: Check "Use Regex" to perform powerful pattern matching (e.g.,
HTTP 50[0-9]or\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}for IPs). - Cluster Errors: Switch to the "Clustered Errors" tab to instantly group repeating error patterns and remove the noise.
- Frontend / Backend Framework: Streamlit
- Data Processing: Pandas
- Visualization: Plotly
- Containerization: Docker (Optimized slim Python image for Google Cloud Run)
loglens/
βββ .streamlit/
β βββ config.toml # Custom Dark Mode theme configuration
βββ src/ # Core backend logic
β βββ __init__.py
β βββ dashboard.py # KPI metrics and Plotly heatmap generation
β βββ log_parser.py # Regex auto-detection and Pandas ingestion
β βββ triage.py # Deduplication clustering and filtering
βββ app.py # Main Streamlit application entry point
βββ requirements.txt # Python dependencies
βββ Dockerfile # Container configuration for deployment
βββ test_logs/ # Sample log files for testing
- Python 3.11+
- pip
-
Clone the repository:
git clone https://github.com/asnaassalam/log-lens.git cd log-lens -
(Optional) Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
streamlit run app.py
-
Start Analyzing! Open
http://localhost:8501in your browser and upload any file from thetest_logs/directory to see the dashboard in action.
Log-Lens is optimized to run as a serverless container on Google Cloud Run.
-
Build the container:
docker build -t log-lens:latest . -
Run locally via Docker (optional):
docker run -p 8501:8501 log-lens:latest
-
Deploy to Google Cloud Run: Assuming you have the
gcloudCLI installed and authenticated:gcloud run deploy log-lens \ --source . \ --allow-unauthenticated \ --region <your-region>
Built with β€οΈ for rapid log triage and troubleshooting. Co-created with the Antigravity AI Agent.