Skip to content

collect_logs

Collect logs from multiple sources in parallel: JS console (Hermes ring buffer snapshot), native iOS (xcrun simctl log stream), native Android (adb logcat). Results merged and sorted by timestamp. Works without CDP when only native sources requested. Use when debugging crashes that span JS and native layers.

NameTypeRequiredDefaultConstraintsDescription
sources`(js_consolenative_iosnative_android)[]`No['js_console']
durationMsnumberNo2000min: 0, max: 10000, integerHow long to stream native logs in ms (default 2000). JS console is a snapshot — durationMs only applies to native sources.
limitnumberNo100min: 1, max: 500, integerMax entries to return (default 100, max 500). Returns most recent entries when truncated.
filterstringNoSubstring filter applied to log text after collection
logLevel`enum: alllogwarnerrorinfo
collect_logs()