Lightning-AI / Lightning-AI/litData

Add support for easy logging setup with sensible defaults

Open
#685 2 comments 2 reactions 1 assignee Claimed by @sanggusti View on GitHub
enhancement good first issue help wanted
Dominant language
Python
Stars
614
Forks
106
Avg merge
15h 8m
Merged PRs (30d)
22

Description

## 🚀 Feature
**Add support for easy logging setup with sensible defaults**

**Description:**
Add a `configure_logging` utility (like [LitServe’s version](https://github.com/Lightning-AI/LitServe/blob/37dac82ac79a164d317a4a2387cf73cdb3fb9fa7/src/litserve/utils.py#L144))

* Set logging level (default `INFO`) in init, like in [litserve](https://github.com/Lightning-AI/LitServe/blob/37dac82ac79a164d317a4a2387cf73cdb3fb9fa7/src/litserve/__init__.py#L23) or [pytorch lightning](https://github.com/Lightning-AI/pytorch-lightning/blob/master/src/lightning/__init__.py).
* Use clean format and `sys.stdout` stream
* Optional `use_rich=True` for pretty logs
* Show only important progress/info logs by default; move other logs to `DEBUG`

Example:

```python
from litdata import configure_logging
configure_logging(level="INFO", use_rich=True)
```

**Benefit:** Cleaner, more useful logging out of the box.

cc: @tchaton @deependujha

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.