Skip to content

Interface: CapturedLog

@termwright/test


@termwright/test / CapturedLog

Defined in: test/src/logs.ts:15

One log entry, tagged with the session that produced it.

  • AppLogEvent

readonly optional label?: string

Defined in: driver/dist/session-DOkKra9W.d.ts:794

AppLogEvent.label


readonly optional line?: string

Defined in: driver/dist/session-DOkKra9W.d.ts:801

Raw line, for a followed file. Truncated lines end with an ellipsis.

AppLogEvent.line


readonly optional path?: string

Defined in: driver/dist/session-DOkKra9W.d.ts:799

Path of the followed file, for source: 'file'. A label can be short and shared between sources; the path is what a reader opens.

AppLogEvent.path


readonly optional record?: LogRecord

Defined in: driver/dist/session-DOkKra9W.d.ts:803

Structured record, for an adapter that negotiated the logs capability.

AppLogEvent.record


readonly sessionId: string

Defined in: test/src/logs.ts:16


readonly source: "file" | "adapter"

Defined in: driver/dist/session-DOkKra9W.d.ts:793

AppLogEvent.source


readonly timeMs: number

Defined in: driver/dist/session-DOkKra9W.d.ts:812

Milliseconds since session start, on the same clock as every other event.

For a file this is when the driver read the line, not when the program wrote it: the two differ by up to one poll interval, so treat it as an upper bound rather than as the write timestamp. A record carries the adapter’s own timestamp inside it.

AppLogEvent.timeMs