A Loguru-based logger with Rich panels, ASCII art headers, blocks and more.
Project description
Pretty-Loguru 🎨
An enhanced Python logging library built on Loguru, integrating Rich and ASCII art to make logging more elegant and intuitive.
✨ Features
- 🎨 Rich Block Logging - Display structured logs using Rich panels
- 🎯 ASCII Art Headers - Generate eye-catching ASCII art titles
- 🔥 One-Click Setup - Simple configuration for both file and console logging
- 🚀 FastAPI Integration - Perfect integration with FastAPI and Uvicorn
- 📊 Preset Configurations - Best practices for development, production, and testing
- 🛠️ Highly Customizable - Support for custom formats, colors, and rotation strategies
📦 Installation
pip install pretty-loguru
🚀 Quick Start
from pretty_loguru import create_logger
# Create logger - it's this simple!
logger = create_logger("my_app")
# Basic logging
logger.info("Application started")
logger.success("Operation completed successfully")
logger.warning("This is a warning")
logger.error("An error occurred")
# Rich visual blocks
logger.block("System Status", "Everything is running smoothly", border_style="green")
# ASCII art headers
logger.ascii_header("WELCOME", font="slant")
# With file output
logger = create_logger("my_app", log_path="logs", level="INFO")
📚 Want more? Check out our User Guide for advanced features like configuration templates, multi-logger management, and framework integrations.
📖 Documentation
Full documentation available at: https://joneshong.github.io/pretty-loguru/
🤝 Contributing
Issues and Pull Requests are welcome!
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pretty_loguru-1.2.0.tar.gz.
File metadata
- Download URL: pretty_loguru-1.2.0.tar.gz
- Upload date:
- Size: 57.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0075bdadbf608c91c5171b2f903ca66017f81c52c9979440c412398e9e8ca04f
|
|
| MD5 |
a38c3cf260e16f0488a68affefd9f7d7
|
|
| BLAKE2b-256 |
22644e82e8057ea54a91ebf7ce896f2b5bb04942deadc40f63bfbcbd3382021d
|
File details
Details for the file pretty_loguru-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pretty_loguru-1.2.0-py3-none-any.whl
- Upload date:
- Size: 70.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d6a3fd49c03f17e7699119c9901d1db340e67830ff4106bdd2a09219be9570e
|
|
| MD5 |
3cf52bd513ca328513261c5f27218dc8
|
|
| BLAKE2b-256 |
ef8aff2ef2f453d66b6455a2664b56b2eaa3c65785563690fc509f27a7b3875f
|