Read a run's recorded step output (stdout and stderr), without progress messages

Usage: barca logs [OPTIONS] [RUN_ID]

Arguments:
  [RUN_ID]
          Exact run id from get/run JSON or history (default: the most recent run; with --follow, the newest running run)

Options:
      --step <STEP>
          Function name or exact node id (including a partition key when desired)

      --stream <STREAM>
          Only the lines of this stream (default: both)

          Possible values:
          - stdout: What the steps printed to stdout
          - stderr: What the steps wrote to stderr: logging, warnings, tracebacks of failed attempts

  -f, --follow
          Print a running run's lines as they arrive and exit when it ends (exit 0 when it succeeded, 130 when it was cancelled, 1 otherwise). With --json, one JSON object per line

      --timestamps
          Text output: put each line's arrival time (UTC, milliseconds) before it. JSON always has it as `ts`

      --json
          Emit JSON on stdout (the default when stdout is not a terminal)

      --pretty
          Emit human-readable output (the default when stdout is a terminal)

      --env <ENV>
          Environment whose history to read

      --server [<URL>]
          Run this command on a barca server (`barca serve`) and print its result here: the URL given, or with no URL the configured one (BARCA_SERVER, else [server] url in barca.toml). Without it, get and run run on this machine (against a configured server's ledger) and status, history, stats and logs are answered by a configured server

      --local
          Ignore any configured server for this command: run against this machine's own ledger and records; nothing is read from or sent to the server

  -h, --help
          Print help (see a summary with '-h')

Examples:
  barca logs                            # the most recent run; stderr names which one
  barca logs -f                         # follow the newest running run until it ends
  barca logs 7f30b3e9 --follow --step report   # follow one step of a run
  barca logs --step report              # one step of the most recent run
  barca logs 7f30b3e9 --stream stderr   # only stderr: logging, warnings, tracebacks
  barca logs 7f30b3e9 --timestamps      # each line after its UTC arrival time
  barca logs 7f30b3e9 --pretty          # recorded lines, without progress messages
  barca logs 7f30b3e9 --step report --pretty   # one function name or exact node id
  barca logs 7f30b3e9 --json            # [{node_id, stream, ts, line}] in recorded order
  barca logs 7f30b3e9 --env dev         # read another environment's local history
  barca logs --server -f                # follow the newest running run on the server
  barca logs 7f30b3e9 --local           # this machine's records, despite a configured server

Replace the example id with run_id from barca run/get --json or barca history. Without a run
id, barca reads the newest run in barca history (running or finished) and names it on stderr:
barca: logs of the most recent run: <run_id> (<command> <target>, <status>, started <time>).
With -f and no run id it follows the newest running run (else the most recent run).
Records what steps write to stdout and to stderr (Python logging, warnings, tracebacks of
failed attempts); not native writes to the descriptors or subprocess output. Reads the
recorded lines; does not execute or import pipeline code. With a configured server it reads
the server's runs; --local reads this machine's. -f exits when the run ends: 0 when it
succeeded, 130 when it was cancelled, 1 otherwise. Unknown runs and ambiguous or unrecorded
step names are usage errors; a recorded step that printed nothing returns no lines.
More: barca docs logs
