LogLens is an intelligent log analysis tool based on large models, designed to help developers quickly locate the root cause of online issues and provide fix suggestions.
Key Capabilities
- Intelligent Analysis: AI understands log context and locates the true root cause of problems.
- Error Grouping: Similar errors are clustered into one category (such as timeouts, connection refused, OOM, disk full, permissions, etc.), and are not split apart by variable parameters such as elapsed time or order numbers.
- Multi-line Stack Trace Merging: A Java exception together with dozens of lines of
at ...frames counts as 1 event, and is no longer split into dozens of context-free fragments; both indented frames andatframes output at column zero by custom layouts can be recognized; error samples automatically include the "↳ top frame", directly pointing out which line of code threw the error. - Fast Localization: Extract key information from massive logs within seconds.
- Visual Reports: Generate structured analysis reports.
- Fix Suggestions: Provide concrete code fix solutions.
- CLI Tool: A lightweight command-line tool, ready to use upon installation.
- Web Interface: Start locally, paste/drag logs for online analysis; the service only listens on 127.0.0.1, and logs never leave your machine.
Usage
LogLens uses the requests library to call the DeepSeek LLM API; please ensure it is installed. It supports the DeepSeek large model for intelligent root cause analysis and requires an API Key to be configured (obtain it at: DeepSeek Open Platform).
The Web interface supports pasting logs directly, or dragging .log / .txt files into the dashed box. By default, it uses the local rule engine for analysis (error grouping + root cause inference + fix suggestions); when DEEPSEEK_API_KEY is configured, error samples are sent to the LLM for deeper root cause analysis.
Privacy: The Web service only runs on your own computer, and log text is not uploaded to any third-party server.
Supports custom ports / not automatically opening the browser.
CLI example: analyze application logs (LLM intelligent analysis).
Tests use the Python standard library unittest(no need to install pytest), covering log format parsing (standard / Spring Boot / Python / JSON-JSONL), level filtering, error aggregation statistics and classification grouping, multi-line stack trace merging, Web interface contract (page reachable, drag-and-drop entry,/analyze endpoint, rejection of invalid input), and CLI contract (analyze pipeline,-o report written to disk, error when file does not exist). Please ensure all pass before submitting a PR.
Applicable Scenarios
Suitable for developers who need to quickly analyze online logs and locate error root causes, especially for scenarios with many Java exception stack traces.
Limitations
No other limitation information is currently provided.