Rich Block Logging
Display structured log blocks with borders and styles using Rich panels, making system status clear at a glance.
Based on Loguru, integrated with Rich and ASCII Art for more elegant log outputs.
pip install pretty-loguru
from pretty_loguru import create_logger
# Initialize the logging system with one line of code
logger = create_logger(
name="en_demo",
log_path="my_logs",
level="INFO"
)
# Start using various logging features
logger.info("Application started successfully")
logger.success("Database connection is normal")
logger.warning("Memory usage is high")
# Rich Block Log
logger.block(
"System Status Summary",
[
"CPU Usage: 45%",
"Memory Usage: 60%",
"Disk Space: 120GB available",
"Network Connection: Normal"
],
border_style="green",
log_level="INFO"
)
# ASCII Art Header
logger.ascii_header(
"SYSTEM READY",
font="slant",
border_style="blue"
)
I am... | Recommended Path | Estimated Time |
---|---|---|
🆕 Python Logging Beginner | 5-min Experience → Core Features → Visualization | 30 minutes |
🌐 Web Developer | Quick Start → Core Features → Framework Integration | 45 minutes |
🏭 DevOps/Operations | Installation → Production Guide → Advanced Config | 1 hour |
🔬 Advanced Developer | API Docs → Complete Examples → Custom Development | 2-3 hours |
I want to... | Jump directly to |
---|---|
⚡ 5-minute Quick Experience | Quick Experience |
🎨 Beautiful Log Output | Visualization Features |
🚀 FastAPI Integration | Framework Integration |
🏭 Production Deployment | Production Guide |
📚 Complete Learning | Learning Center |
This project is licensed under the MIT License.