Quick Start
Log Levels
| Level | Value | Description |
|---|---|---|
DEBUG | 10 | Detailed information for debugging |
INFO | 20 | General operational information |
WARNING | 30 | Warning messages (default) |
ERROR | 40 | Error messages |
CRITICAL | 50 | Critical failures |
Setting Log Level
Log Format
Simple Format (Default)
Query
Response
Verbose Format
Query
Response
What Gets Logged
DEBUG Level
- SQL queries generated
- Execution engine selection
- Cache operations (hits/misses)
- Operation timings
- Data source information
INFO Level
- Major operation completions
- Configuration changes
- Data source connections
WARNING Level
- Deprecated feature usage
- Performance warnings
- Non-critical issues
ERROR Level
- Query execution failures
- Connection errors
- Data conversion errors
Custom Logging Configuration
Using Python Logging
Log to File
Suppress Logging
Debugging Scenarios
Debug SQL Generation
Debug Engine Selection
Debug Cache Operations
Debug Performance Issues
Production Configuration
Recommended Settings
Log Rotation
Environment Variables
You can also configure logging via environment variables:Summary
| Task | Command |
|---|---|
| Enable debug | config.enable_debug() |
| Set level | config.set_log_level(logging.DEBUG) |
| Set format | config.set_log_format("verbose") |
| Log to file | Use Python logging handlers |
| Suppress logs | config.set_log_level(logging.CRITICAL) |