awesome-python
awesome-python copied to clipboard
Add `chromologger` module to 'Logging' section
What is this Python project?
chromologger is a lightweight module for creating logs in Python in a simple, structured way. Its main features are:
- Quick instantiation: create a Logger with a single parameter (a file path).
- Readable format: each entry includes a timestamp, level (INFO, ERROR) and message in one line, using
log(msg: str)for any message andlog_e(e: Exception)as a shortcut to record exceptions with their stack trace. - Installation via pypi.org
pip install chromologger
What’s the difference between this Python project and similar ones?
| Aspect | Chromologger | Loguru | Structlog |
|---|---|---|---|
| Installation | pip install chromologger |
pip install loguru – plugin-rich |
pip install structlog – requires setup |
| Configuration | Zero upfront configuration, ready to use | Optional: decorate functions or add sinks | Define processors and wrappers manually |
| Format | Fixed: [timestamp] - LEVEL - message with log() for general entries and log_e() for exceptions |
Highly customizable via f-strings | Structured output: key/value or JSON |
| Approach | Basic, fast logging for small scripts/apps | Advanced logging for medium/large projects | Structured logging in complex applications |
Anyone who agrees with this pull request could submit an Approve review to it.