glass_wait_for_log
Block until a log line containing a specified substring appears. Returns the matched line, cursor, and elapsed milliseconds, or signals timeout if not found within the time limit. Optionally filter by stream and start from a cursor.
Instructions
Block until a log line containing contains (optionally on a given stream) appears, then return it as text. By default only lines emitted after this call count; pass a cursor from glass_logs to catch a line emitted just before. Returns {matched,line{seq,stream,text},cursor,elapsed_ms}; on timeout {matched:false}. Resume reading from the returned cursor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Start scanning from this cursor (from a prior glass_logs). Omit to match only lines emitted after this call. | |
| stream | No | "stdout", "stderr", or "both" (default). | |
| contains | Yes | Substring to wait for (required, non-empty). | |
| timeout_ms | No | Give up after this long (default 10000ms); returns `{matched:false}`. | |
| interval_ms | No | Poll interval (default 100ms). |