server_read_logs

Summary: Server Read LogsPOST /api/execute/server_read_logs

Retrieves 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

NameTypeRequiredDescription
sourceenum (browser | server)noTarget log stream: choose browser for engine traces or server for HTTP gateway records.
modeenum (head | tail | range)noSlicing strategy selecting head for earliest lines, tail for latest, or range for indexed bounds.
linesstringnoMaximum count of log rows returned when operating in head or tail slicing modes.
start_linestringnoOne-indexed inclusive starting line number used when reading a specific range slice.
end_linestringnoOne-indexed inclusive ending line number bounding a range read; defaults to start plus 100.
filterstringnoRegular expression or literal substring pattern that returned log lines must match.
levelenum (DEBUG | INFO | WARN | ERROR)noSeverity threshold filter restricting output to DEBUG, INFO, WARN, or ERROR messages.

Usage

result = await browser.server_read_logs()

See Also