Metadata-Version: 2.4
Name: logpretty
Version: 0.1.0
Summary: Beautiful, colorful logging for Python — zero config
License: MIT
Project-URL: Repository, https://github.com/shahabRDZ/logpretty
Keywords: logging,color,terminal,pretty,formatter
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Logging
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

<h1 align="center">logpretty</h1>

<p align="center">
  <strong>Beautiful, colorful logging for Python — zero config</strong>
</p>

<p align="center">
  <img src="https://img.shields.io/badge/python-3.10+-blue?logo=python&logoColor=white" />
  <img src="https://img.shields.io/badge/dependencies-zero-brightgreen" />
  <img src="https://img.shields.io/badge/license-MIT-green" />
</p>

---

## Before / After

**Before** (default Python logging):
```
INFO:root:Server started
WARNING:app.auth:Invalid token
ERROR:app.db:Connection failed
```

**After** (with logpretty):
```
14:32:05  INFO      app.main                   Server started
14:32:06  WARNING   app.auth                   Invalid token
14:32:07  ERROR     app.db                     Connection failed
```
With colors: INFO is green, WARNING is yellow, ERROR is red.

## Install

```bash
pip install logpretty
```

## Usage

```python
from logpretty import setup_logging, get_logger

setup_logging()  # one line, done

logger = get_logger(__name__)
logger.info("Server started")
logger.warning("Slow query detected")
logger.error("Connection failed")
```

## Features

- Colored output (auto-disabled in CI / pipes)
- Aligned columns for easy scanning
- Timestamps in HH:MM:SS format
- Long logger names auto-truncated
- Exception tracebacks included
- Zero dependencies — pure Python
- Drop-in replacement for `logging.basicConfig()`

## Configuration

```python
setup_logging(
    level="DEBUG",       # log level
    colors=True,         # force colors on/off (auto by default)
    show_time=True,      # show/hide timestamp
    show_name=True,      # show/hide logger name
)
```

## License

MIT
