Skip to content

canair logs

usage: canair logs [-h] [-n LINES] [--path] [--clear] [--yes] [--json]

``canair logs`` — view the central rotating diagnostics event log.

canair records transport-level faults (dropped/stale ISO-TP frames, timeouts,
bus errors, decode failures) and unexpected internal errors to a single collated,
size-rotated log so they can be inspected after the fact — the "why did that
capture look off?" trail. The file rotates automatically (a small ``maxBytes``
with a few backups), so it never grows unbounded and needs no manual cleanup.

Read-only by default; ``--clear`` deletes the log and its rotated backups.

options:
  -h, --help            show this help message and exit
  -n LINES, --lines LINES
                        Number of recent lines to show (default: 50)
  --path                Print the log file path and exit
  --clear               Delete the event log and its rotated backups
  --yes, -y             Skip the --clear confirmation
  --json                Emit machine-readable JSON

examples:
  canair logs                 # last 50 event-log lines
  canair logs -n 200          # last 200 lines
  canair logs --path          # print the log file path
  canair logs --json          # machine-readable (parsed fields)
  canair logs --clear         # delete the log + rotated backups