Logging¶
janito provides logging options for debugging and troubleshooting.
Enabling Logging¶
Use the --log flag to enable logging:
janito --log=info "Your prompt"
janito --log=debug "Your prompt"
janito --log=info,debug "Your prompt"
Log Levels¶
| Level | Description | Use Case |
|---|---|---|
info |
General information | Show progress, tool usage |
debug |
Detailed debugging | Troubleshooting, development |
error |
Error messages only | Minimal output |
warning |
Warnings and errors | Catching issues |
Multiple Levels¶
Enable multiple log levels by separating with commas:
Log Output¶
Logs are written to stderr, so they don't interfere with tool output or responses.
Example output:
[INFO] Initializing janito...
[DEBUG] Loading configuration from ~/.janito/config.json
[INFO] Using provider: openai
[DEBUG] API request: model=gpt-4, tokens=150
[INFO] Processing tools...
Debugging Tips¶
Enable Full Debug Output¶
Save Logs to File¶
View Recent Logs¶
Common Issues to Debug¶
- API errors: Use
--log=debugto see request/response details - Tool execution: Use
--log=infoto see which tools are called - Configuration issues: Check if settings are loaded correctly
- MCP connections: Enable debug logging to see MCP traffic