Skip to main content

Logs

Query, follow, and export relay operation logs. Logs include relay-native events, controller events, and extension node events streamed from the browser.

otto logs list

Pulls a bounded list of historical log entries.

Usage

otto logs list [options]

Flags

FlagShorthandRequiredTypeDefaultAllowed valuesDescription
--sourceNostringallrelay, controller, node, allFilter by log source
--latestNonumber100Return the newest N entries
--levelNostringdebug, info, warn, errorFilter by log level
--sinceNostringISO-8601 datetimeReturn entries after this timestamp
--node-idNostringFilter by node ID
--request-idNostringFilter by requestId
--jsonNobooleanfalseOutput as NDJSON

Examples

# Pull the latest 100 entries from all sources
otto logs list

# Pull the latest 200 entries
otto logs list --latest 200

# Pull extension-originated logs only
otto logs list --source node --latest 50

# Pull logs correlated to a specific request
otto logs list --request-id <requestId> --source all

# Machine-readable output
otto logs list --json

Exit codes

CodeMeaning
0Logs returned
1Relay error or invalid filter

otto logs follow

Streams live log events from the relay. Runs until Ctrl+C.

Usage

otto logs follow [options]

Flags

FlagShorthandRequiredTypeDefaultAllowed valuesDescription
--sourceNostringallrelay, controller, node, allFilter by log source
--levelNostringdebug, info, warn, errorFilter by level
--jsonNobooleanfalseOutput as NDJSON (one envelope per line)

Examples

# Follow all sources live
otto logs follow

# Follow extension runtime logs only
otto logs follow --source node

# Follow with full JSON envelopes
otto logs follow --source all --json

# Follow relay events only
otto logs follow --source relay
note

otto logs follow is unbounded. For automation, enforce a caller-side timeout window and pipe to your log aggregator.

Exit codes

CodeMeaning
0Exited cleanly (Ctrl+C)
1Connection error

otto logs status

Reports storage status for the relay operation log files.

Usage

otto logs status [options]

Flags

FlagShorthandRequiredTypeDefaultDescription
--jsonNobooleanfalseOutput as JSON

Examples

otto logs status

otto logs status --json

Output includes total bytes across all operation log files and active windowing settings.

Exit codes

CodeMeaning
0Status reported
1Relay error

otto logs export

Exports a slice of operation logs as NDJSON to stdout or a file.

Usage

otto logs export [options]

Flags

FlagShorthandRequiredTypeDefaultAllowed valuesDescription
--sourceNostringallrelay, controller, node, allFilter by source
--latestNonumberExport newest N entries
--sinceNostringISO-8601 datetimeExport entries after this timestamp
--levelNostringdebug, info, warn, errorFilter by level
--node-idNostringFilter by node ID
--request-idNostringFilter by requestId
--output-oNostringstdoutOutput file path

Examples

# Export latest 500 relay entries
otto logs export --source relay --latest 500

# Export to file
otto logs export --source all --latest 1000 --output ./logs.ndjson

# Export correlated logs for an incident
otto logs export --request-id <requestId> --source all

Exit codes

CodeMeaning
0Export completed
1Relay error or write failure