Overview
Theftl logs command displays a session audit log showing the history of all FTL coding sessions. Each log entry captures the task description, event type, snapshot ID, and result (merged/rejected).
Usage
Options
integer
default:"20"
Number of log entries to show (most recent N entries)
boolean
default:"false"
Show logs for all projects instead of just the current project
Examples
View Recent Logs
Limit to 10 Entries
View All Projects
No Logs Found
Log Entry Fields
Time
Timestamp when the session event occurred, formatted asMM-DD HH:MM.
Event
The type of session event. Common values:complete- Task completed successfullystart- Task startederror- Task encountered an error
Task
The task description provided toftl code. Truncated to 50 characters in the table.
Snapshot
The snapshot ID created for this session. Use this ID withftl snapshots or the FTL shell to restore changes.
Result
What happened to the snapshot:merged(green) - Changes were merged into the working directoryrejected(red) - Changes were rejected and discarded- Empty - Session still active or no decision made yet
Log Storage
Local Mode
Logs are stored in~/.ftl/sessions.log as JSON lines:
AWS Mode
When configured withftl config --aws, logs are sent to CloudWatch Logs:
Filtering by Project
By default,ftl logs shows only logs for the current project (detected via .ftlconfig). Use --all to see logs across all projects.
Use Cases
Review Recent Activity
Audit Trail
Find Snapshot ID
Track Rejection Rate
Troubleshooting
No Logs File
If you’ve never runftl code, the log file won’t exist:
ftl code "your task".
Logs from Other Projects
If you don’t see expected logs, they might be filtered by project:Log Rotation
FTL does not automatically rotate or clean up log files. To manage log size:- Manually truncate or archive
~/.ftl/sessions.log - In AWS mode, configure CloudWatch log retention policies
See Also
- ftl code - Run tasks that generate log entries
- ftl snapshots - View snapshots referenced in logs
- ftl config - Configure CloudWatch logging