Component test reference

verifier logs

The logs subcommand

Read and filter the structured log records from a test run.

Synopsis

verifier logs [--logs FILE] [--level LEVEL] [--scope PREFIX]
    [--iteration N] [--protocol NAME] [--attempt N] [--json]
verifier logs tui [--logs FILE] [--choose]

Description

verifier logs reads the log.json artifact from a previous run and prints matching records to stdout. Without any filter flags, all records are printed. When no --logs path is given, Verifier finds the newest log.json under .verifier/ automatically.

Records are printed as a human-readable line per entry by default. Pass --json to emit the filtered records as a JSON array, preserving the on-disk format.

The tui subcommand opens an interactive browser for the same log. Use --choose to pick from available runs interactively before the browser opens. The filter flags apply to the browser as well, so you can narrow the records before you start reading them; give them before the tui name.

Options

  • --attempt N: Optional Show only records tagged with attempt N. Requires --protocol.
  • --iteration N: Optional Show only records tagged with iteration N.
  • --json: Optional Emit matching records as a JSON array, preserving the on-disk record format.
  • --level LEVEL: Optional Show only records at this priority or higher. Choices: trace, debug, info, warning, error.
  • --logs FILE: Optional (Defaults to newest .verifier/*/log.json) Path to a log.json file to read.
  • --protocol NAME: Optional Show only records tagged with the named protocol.
  • --scope PREFIX: Optional Filter records by hierarchical scope prefix, for example verifier.transport.

logs tui

  • --choose: Optional Pick a log from .verifier interactively before opening the browser. Mutually exclusive with --logs.
  • --logs FILE: Optional (Defaults to newest .verifier/*/log.json) Path to a log.json file to open. When both logs --logs and logs tui --logs are given, the tui value takes precedence.

Examples

Print all log records from the most recent run:

verifier logs

Print only warnings and errors:

verifier logs --level warning

Show records for one protocol in iteration 0:

verifier logs --iteration 0 --protocol sampleFlow

Show records for one attempt within a protocol:

verifier logs --protocol sampleFlow --attempt 2

Write filtered records to a JSON file:

verifier logs --protocol sampleFlow --json > protocol_logs.json

Open the interactive log browser for the most recent run:

verifier logs tui

Choose which run to browse interactively:

verifier logs tui --choose

Open the browser for a specific log file:

verifier logs tui --logs ./archive/log.json