Logs · DeviceLogs
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Read a log: the current WebView's console, or the device's own log (logcat on Android, the unified log on an iOS simulator, and on a real iPhone what the session has captured since it started — a phone keeps no history). These call app_logs.
Logs
public IList<IDictionary<string, object?>> Logs()
Console output from the current WebView since the last call, including uncaught errors and unhandled promise rejections. Each read drains what it returns.
The source is named because with none the tool follows the context and would read the device log on the native shell.
DeviceLogs
public IDictionary<string, object?> DeviceLogs(string? app = null, string? level = null, int lines = 0)
The device's own log since the last read: logcat on Android, the
unified log on an iOS simulator, what a real iPhone's session has captured. The map has entries — each
with time, level, tag, pid and message — and skipped, lines
newer than the last read that the limit dropped, which will not
come back. The first read returns the most recent lines. Pass null
or zero to leave a filter unset.
Examples
Read one app's errors from the device log
var log = device.DeviceLogs(app: "com.example.shop", level: "error");
var entries = log["entries"];