server_read_logs
POST /api/execute/server_read_logsRetrieves filtered diagnostic log lines from either the rendering engine process or the front-end HTTP control server. Depending on the selected source stream, the reader inspects either low-level IPC command traces, Blink rendering events, and console messages, or incoming REST gateway access and error records. Callers can slice the file using `head` for initial startup output, `tail` for recent activity, or `range` for exact one-indexed line boundaries. Before returning results, the parser optionally filters lines by severity level (`DEBUG`, `INFO`, `WARN`, `ERROR`) and evaluates a substring or regular expression pattern against each candidate row. This capability enables remote troubleshooting of page load failures, crash stack traces, or authentication rejections without requiring direct interactive SSH shell access to the production host.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| source | enum (browser | server) | no | Target log stream: choose browser for engine traces or server for HTTP gateway records. |
| mode | enum (head | tail | range) | no | Slicing strategy selecting head for earliest lines, tail for latest, or range for indexed bounds. |
| lines | string | no | Maximum count of log rows returned when operating in head or tail slicing modes. |
| start_line | string | no | One-indexed inclusive starting line number used when reading a specific range slice. |
| end_line | string | no | One-indexed inclusive ending line number bounding a range read; defaults to start plus 100. |
| filter | string | no | Regular expression or literal substring pattern that returned log lines must match. |
| level | enum (DEBUG | INFO | WARN | ERROR) | no | Severity threshold filter restricting output to DEBUG, INFO, WARN, or ERROR messages. |
Usage
result = await browser.server_read_logs()