Metadata-Version: 2.4
Name: logurich
Version: 0.3.0
Summary: A Python library combining Loguru and Rich for beautiful logging.
Author-email: PakitoSec <jeromep83@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/PakitoSec/logurich
Project-URL: Repository, https://github.com/PakitoSec/logurich
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Logging
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: loguru
Requires-Dist: rich
Provides-Extra: click
Requires-Dist: click>=8.1.8; extra == "click"
Dynamic: license-file

# logurich

[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


A Python library combining Loguru and Rich for beautiful logging.

## Installation

```bash
pip install logurich
pip install logurich[click]
```

## Usage

```python
from logurich import logger

# Use the logger
logger.info("This is a log message")

# Use rich color and rich object formatting
logger.info("[bold green]Rich formatted text[/bold green]")

# Panel rich object with logger and prefix
logger.rich(
    "INFO", Panel("Rich Panel", border_style="green"), title="Rich Panel Object"
)

# Panel rich object without prefix
logger.rich(
    "INFO",
    Panel("Rich Panel without prefix", border_style="green"),
    title="Rich Panel",
    prefix=False,
)
```

## Click CLI helper

Install the optional Click extra to automatically expose logger configuration flags inside your commands:

```python
import click
from logurich import logger
from logurich.opt_click import click_logger_params


@click.command()
@click_logger_params
def cli():
    logger.info("Click integration ready!")
```

The `click_logger_params` decorator injects `--logger-level`, `--logger-verbose`, `--logger-filename`, `--logger-level-by-module`, and `--logger-diagnose` flags and configures Logurich before your command logic runs. The usage example above is also available at `examples/click_cli.py`.
