Lightning-AI / Lightning-AI/litData
Add support for easy logging setup with sensible defaults
- 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
Assessment
This issue has not been assessed yet.