Rich
LoglyRichSink provides beautiful console output using the Rich library. Implements the write-style sink interface.
Installation
This integration requires the rich package.
bash
uv add logly[rich]bash
pip install "logly[rich]"bash
uv add richbash
pip install richMissing Dependency
If rich is not installed, you'll see:
ModuleNotFoundError: No module named 'rich'Usage
python
from logly import logger
from logly.integrations.rich import LoglyRichSink
logger.add(LoglyRichSink(), colorize=True)Full Example
python
from logly import logger
from logly.integrations.rich import LoglyRichSink
# Add Rich sink with colorized output
logger.add(LoglyRichSink(), colorize=True, level="DEBUG")
logger.debug("Debug message")
logger.info("Info message")
logger.warning("Warning message")
logger.error("Error message")
logger.critical("Critical message")