Skip to main content
Run substrate logs to read the persistent log file written by the long-lived substrate mcp and substrate serve processes. The file is gitignored and local-only. Reading crosses a rotation boundary correctly, so -n is honoured even when the log just rotated.

Usage

Options

number
How many lines to print. Defaults to 50.
flag
Filter to errors only.

Who Writes to the Log

Only the long-lived processes write here — substrate mcp and substrate serve. Short-lived commands do not log, so substrate logs after a failed one-shot command will not explain it. An agent’s handled tool errors land here, which makes substrate logs --errors the way an agent reviews its own error trail. Routine gate blocks and stale-version retries are excluded on purpose — they are normal operation, not faults.

Empty States