Terminal Logging
Azu provides stunning, colorful performance reports that make monitoring your application's performance a visual delight. The beautiful terminal logging system transforms raw metrics into eye-catching, informative displays.
β¨ Features Overview
π¨ Beautiful Report Formatting
Colorized output with semantic colors (green=good, yellow=warning, red=error)
Unicode box drawing characters for professional layouts
Emoji indicators for different metrics and sections
Visual progress bars for memory usage, response times, and error rates
Responsive layouts that adapt to terminal width
π Multiple Report Types
Full Detailed Report - Comprehensive performance analysis
Compact Summary - One-line performance overview
Health Check - Current system status
Time-based Reports - Hourly and daily performance summaries
π Quick Start
Basic Usage
Integration in Your App
π Report Types
1. Full Beautiful Report
The crown jewel of performance reporting - a comprehensive, beautifully formatted display:
Sample Output:
2. Compact Summary
Perfect for quick health checks or logging at the end of operations:
Sample Output:
3. Health Check
Monitor current system status with real-time metrics:
Sample Output:
4. Time-based Reports
Get performance summaries for specific time periods:
ποΈ Advanced Features
Periodic Reporting
Automatically log performance reports at regular intervals:
Signal Handling for Live Debugging
Add signal handlers for on-demand reporting:
HTTP Endpoints for Remote Monitoring
Access reports via HTTP endpoints (useful for monitoring dashboards):
Available endpoints in example app:
GET /performance/report- Logs beautiful report to terminalGET /demo/reporting/full- Full detailed reportGET /demo/reporting/summary- Compact summaryGET /demo/reporting/health- Health checkGET /demo/reporting/help- Show available commands
π¨ Color Coding System
The beautiful reports use semantic colors to convey meaning at a glance:
Response Times
π’ Green (0-50ms) - Excellent performance
π‘ Light Green (50-200ms) - Good performance
π Yellow (200-500ms) - Acceptable performance
π΄ Light Red (500-1000ms) - Slow performance
β« Red (1000ms+) - Poor performance
Error Rates
π’ Green (0-1%) - Healthy error rate
π‘ Yellow (1-5%) - Elevated error rate
π΄ Red (5%+) - High error rate
Memory Usage
π’ Green (0-1MB) - Low usage
π‘ Light Green (1-5MB) - Normal usage
π Yellow (5-20MB) - Moderate usage
π΄ Light Red (20-50MB) - High usage
β« Red (50MB+) - Very high usage
π§ Configuration
Environment Variables
Programmatic Configuration
π± Usage Examples
During Development
In Production Scripts
API Monitoring
π Demo Script
Try the included demo script to see all features in action:
This demo creates sample performance data and showcases all the beautiful reporting features with realistic metrics.
π Best Practices
When to Use Each Report Type
Full Beautiful Report
End of day/week summaries
Performance analysis sessions
Debugging performance issues
Weekly team reviews
Compact Summary
Application startup/shutdown
End of test runs
Quick health checks
Continuous monitoring scripts
Health Check
Live monitoring dashboards
Automated health checks
Load balancer health endpoints
Real-time system status
Terminal Compatibility
The beautiful reports work best with:
Modern terminals that support Unicode and 256 colors
Terminal width of at least 80 characters
Color support enabled in your terminal
For systems without color support, the reports gracefully degrade to plain text while maintaining readability.
π Troubleshooting
Reports Not Showing Colors
Performance Impact
The beautiful reporting system is designed for minimal overhead:
Report generation: ~1-5ms depending on data size
Memory usage: Minimal, reports are generated on-demand
Production impact: Negligible when used appropriately
Common Issues
Terminal width too narrow: Reports adapt but may wrap oddly
Unicode not supported: Install fonts with Unicode support
Colors not showing: Check terminal color support settings
π Conclusion
The beautiful terminal performance logging transforms mundane performance monitoring into an engaging, visual experience. Whether you're debugging issues, monitoring production systems, or just want to keep an eye on your application's health, these colorful, informative reports make performance data accessible and actionable.
The combination of semantic colors, visual progress bars, and well-organized layouts ensures that critical performance information is immediately apparent, helping you build faster, more reliable applications.
Last updated
Was this helpful?
