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"
)
This project is licensed under the MIT License.