On this page
Use --debug to print provider-level diagnostics (requests, model info, etc.). Use --debug-raw for a timestamped, raw view of tool calls, tool results, and reconstructed requests. Raw debug is most useful for troubleshooting tool calling and search.
Debug Logging
term-llm maintains debug logs for troubleshooting. Use the debug-log command to view and manage them:
term-llm debug-log # Show recent logs
term-llm debug-log list # List available log files
term-llm debug-log show [file] # Show a specific log file
term-llm debug-log tail # Show last N lines
term-llm debug-log tail --follow # Follow logs in real-time
term-llm debug-log search "pattern" # Search logs for a pattern
term-llm debug-log clean # Clean old log files
term-llm debug-log clean --days 7 # Keep only last 7 days
term-llm debug-log export --json # Export logs as JSON
term-llm debug-log enable # Enable debug logging
term-llm debug-log disable # Disable debug logging
term-llm debug-log status # Show logging status
term-llm debug-log path # Print log directory path
Key flags:
| Flag | Description |
|---|---|
--days N |
Limit to logs from last N days |
--show-tools |
Include tool calls/results in output |
--raw |
Show raw log entries without formatting |
--json |
Output as JSON |
--follow |
Follow logs in real-time (with tail) |