Slog ViewerBeautiful structured log viewer for debugging. Automatically transforms JSON/logfmt logs into readable, interactive output with syntax highlighting, filtering, and search.
Features
Quick Start
Task SupportVS Code Tasks let you run commands directly from VS Code. By using Before (standard shell task — logs only in terminal):
After (slogViewer task — logs in Slog Viewer panel + terminal):
Complete
|
| Property | Required | Description |
|---|---|---|
command |
Yes | The command to execute |
args |
No | Array of command arguments |
cwd |
No | Working directory (defaults to workspace folder) |
env |
No | Additional environment variables |
Variable substitution is supported: ${workspaceFolder}, ${file}, ${env:VAR_NAME}.
Supported Formats
JSON
{"time":"2025-01-01T00:00:00Z","level":"info","message":"Server started","port":8080}
Logfmt
time=2025-01-01T00:00:00Z level=info msg="Server started" port=8080
Advanced Filtering
- Click any value - Click on a log message or any JSON field value to open the filter menu
- Include/Exclude - Choose to show only logs with that value, or hide logs with that value
- Filter chips - Active filters appear as chips below the toolbar
- Green chips = include filters
- Red chips = exclude filters
- Click a chip to toggle it on/off
- Click × to remove a filter
- Add Filter button - Manually create filters for any field
Example: To hide all "http request" logs, click on a message containing "http request" and select "Exclude".
Configuration
Access via VSCode Settings → "Slog Viewer":
- Toggle automatic formatting
- Collapse JSON by default
- Auto-scroll to latest logs
- Theme: light, dark, or auto
License
MIT
