Apex Debug Log Parser
Live: spskelly.github.io/apex-log-parser
Repo: GitHub
What It Does
Salesforce debug logs are dense walls of text. This tool turns them into something you can actually read, color-coded by event type, filterable by category, searchable, with governor limits visualized as progress bars. Everything runs client-side; logs never leave your browser.
Features
Parsing & Visualization
- Line-by-line classification, each log line gets categorized into one of 14 event categories (SOQL, DML, Debug, Code Unit, Execution, Error, Validation, Workflow, Flow, Callout, Limit, System, Header, Unknown), each with a distinct color
- Debug level badges,
USER_DEBUGlines show their level (ERROR, WARN, INFO, DEBUG, FINE, etc.) with color coding - Entry/exit pair linking, click a badge on any begin event to highlight the matching end event, with the entire scope range highlighted between them
- Log metadata extraction, debug level settings parsed from the header
- Execution time calculation, computed from nanosecond timestamps
Filtering & Search
- Category filter chips, toggle any combination of event categories; chips show event counts per category
- Full-text search, search across all content with highlighted matches and live match count
- Hide System events, one-click toggle to suppress noise (
HEAP_ALLOCATE,STATEMENT_EXECUTE,VARIABLE_ASSIGNMENT) - Composable filters, category, search, and system toggle all work together
Governor Limits
- Automatic extraction,
LIMIT_USAGE_FOR_NSblocks parsed into structured data - Progress bar visualization, color-coded by severity (green <40%, orange 40-70%, yellow 70-90%, red 90%+)
- Full limit coverage, SOQL queries, query rows, DML statements, DML rows, CPU time, heap size, callouts, email invocations, future calls, queueable jobs, and more
Statistics Dashboard
- SOQL query count and total rows returned
- DML operation count and rows affected
- Debug log count, errors and warnings
- Total execution time in milliseconds
- Debug level configuration from log header
Performance
- Chunked rendering, large logs render in 2,000-line chunks with IntersectionObserver for lazy-loading as you scroll
- Debounced search, 150ms debounce keeps the UI responsive on large logs
Input Methods
- Paste, auto-parses when content exceeds 500 characters
- Drag and drop,
.log,.txt, or.debugfiles - File browser, standard file picker
- Sample log, built-in example demonstrating all features
Privacy
Everything runs client-side. Logs are never uploaded, transmitted, or stored anywhere outside your browser. The service worker caches the app’s assets and its fonts; log content is never cached or transmitted.
Technical Details
~1,600 lines across 4 files (index.html, app.js, styles.css, sw.js), plus a manifest. No build step, no framework, no dependencies. The parser handles the full Salesforce log format including nested code unit scopes, governor limit blocks, and the various debug level classifications.