Log File Monitor for VS Code

Website • VS Code Marketplace Listing
Monitor and analyze log files in real-time without leaving your editor!
Features
- Smart Format Detection: Automatically detects and parses 8+ log formats including JSON, Syslog, Apache, Nginx, WebLogic, MySQL, Tomcat, and generic logs
- Real-time Monitoring: Stream updates from multiple log files in real time from the Simple Logs activity view
- Advanced Filtering: Instant search with regex and match-case toggles, plus quick log level switches
- Saved Searches: Save and reapply filters from the Saved Searches tree view
- Customizable Display: Toggle auto-scroll, line wrapping, and line numbers directly in the viewer
- Export Capability: Export the currently filtered log view to a file
- Log Analysis: Review per-level counts in the Analysis tree view and drill in with one click
- Format Selector: Manually select or redetect log format with built-in format information
Installation
- Open VS Code
- Go to Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Simple Logs!"
- Click Install
Alternatively, visit https://simple-logs.app/ and click Install.
Usage
- Open the Simple Logs view from the Activity Bar.
- Run Simple Logs: Start Monitoring and select one or more log files.
- Pick a file in the tree to stream its contents into the webview.
- Use the search box, regex/match-case toggles, and level buttons to narrow the results.
- Click the save icon to store the current filter; saved filters appear in the Saved Searches view and can be applied with one click.
- Toggle auto-scroll, line wrap, or line numbers from the toolbar as needed.
- Open the Analysis view to see log-level counts and jump straight to a level-filtered view.
- Export the filtered content via Simple Logs: Export Log when you need to share the results.
Configuration
Configure the extension through VS Code settings (simpleLogs namespace). Common options:
"simpleLogs.files": [
"/var/log/nginx/access.log",
"${workspaceFolder}/logs/application.log"
],
"simpleLogs.maxDisplayLines": 1000,
"simpleLogs.autoScrollDefault": true,
"simpleLogs.advancedFiltering": false
Commands
- Simple Logs: Start Monitoring – Select log files to begin streaming into the viewer.
- Simple Logs: Stop Monitoring – Stop watching a monitored file.
- Simple Logs: Add File – Add an existing log file to the monitored list.
- Simple Logs: Remove File – Remove a log from the monitored list.
- Simple Logs: Toggle Auto-Scroll – Turn auto-scroll on or off in the webview.
- Simple Logs: Load Saved Search – Apply a saved filter from the Saved Searches view.
- Simple Logs: Remove Saved Search – Delete a stored filter from the Saved Searches view.
- Simple Logs: Export Log – Save the currently filtered log output to disk.
- Simple Logs: Filter by Level – Apply a level filter from the Analysis view.
- Simple Logs: Select Format – Manually choose a log format parser
- Simple Logs: Redetect Format – Trigger automatic format detection
- Simple Logs: Show Format Info – Display information about the detected format
Simple Logs automatically detects and parses multiple log formats with intelligent log level extraction:
| Format |
Priority |
Description |
Example |
| JSON |
90 |
Structured JSON logs with timestamp, level, message fields |
{"timestamp":"2024-11-01T08:00:00Z","level":"INFO","message":"User login"} |
| Syslog |
80 |
RFC3164 and RFC5424 syslog formats |
<34>Oct 12 10:15:03 server1 sshd[1234]: Connection accepted |
| WebLogic |
75 |
Oracle WebLogic Server logs (v12-15) |
<Nov 1, 2024 10:15:03 AM> <Info> <WebLogicServer> <BEA-000360> |
| Apache |
70 |
Apache Common/Combined log format |
192.168.1.100 - - [12/May/2023:10:15:30 +0000] "GET / HTTP/1.1" 200 1234 |
| Nginx |
70 |
Nginx access logs |
192.168.1.100 - - [12/May/2023:10:15:30 +0000] "GET / HTTP/1.1" 200 1234 "-" "Mozilla/5.0" |
| MySQL |
65 |
MySQL slow query and error logs |
# Time: 2024-04-01 01:47:06 |
| Tomcat |
65 |
Tomcat/Catalina logs |
01-Apr-2024 00:17:47.274375 INFO [thread] org.apache.catalina... |
| Generic |
10 |
Fallback parser for any text logs |
Any format with INFO, WARN, ERROR, etc. |
The parser system uses confidence scoring to automatically select the best parser for each log file. You can manually override the detected format using the Select Format command.
For large log files (>50MB), the extension automatically optimizes by:
- Loading only the most recent portion of the file
- Using incremental updates instead of rereading the entire file
Troubleshooting
Log File Access Issues
Ensure VS Code has permission to read the log files you're monitoring. For system logs on Linux/macOS, you may need to run VS Code with elevated privileges or adjust file permissions.
High CPU/Memory Usage
If monitoring very active log files, try:
- Lowering
simpleLogs.maxDisplayLines to keep the in-memory buffer smaller.
- Toggling auto-scroll off while inspecting spikes to reduce repaint work.
- Stopping monitoring for files you no longer need in the session.
Development
Prerequisites
- Node.js (v14 or higher)
- VS Code
- Git
Setup
git clone https://github.com/simplelogs/log-monitor.git
cd log-monitor
npm install
Running & Debugging
- Open the project in VS Code
- Press F5 to launch an Extension Development Host window
- In the development window, open a folder with log files to test
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This extension is licensed under the MIT License.