block-quote On this pagechevron-down
copy Copy chevron-down
CLI Reference locus logs View, tail, and manage execution logs. Filter by level, follow in real time, and prune old log files.
View and manage Locus execution logs. Logs are stored as structured NDJSON files in .locus/logs/ and capture events from all CLI operations.
Tail the log file in real time (Ctrl+C to stop)
Filter entries by log level: error, warn, info, verbose, debug
Maximum number of lines to display (default: 50)
Remove old log files, keeping only the most recent one
View Logs (default)
Without any flags, displays the most recent log file with up to 50 entries.
Each entry shows timestamp, level (ERR, WRN, INF, VRB, DBG), message, and any additional structured data fields.
Filter by Level
Show only entries at or below the specified severity. For example, --level warn shows only errors and warnings.
The level hierarchy from most to least severe: error > warn > info > verbose > debug.
Tail the log file in real time, printing new entries as they appear. Starts by showing the last 10 entries, then follows.
Press Ctrl+C to stop following.
Control how many lines to display.
Remove all log files except the most recent one, freeing disk space.
Reports the number of files removed and disk space freed.
Log files are named locus-<timestamp>.log and contain one JSON object per line (NDJSON format):
Each entry contains:
Log level: error, warn, info, verbose, debug
Context-specific key-value pairs