https://github.com/pmeier/l2sl
logging to structured logging
https://github.com/pmeier/l2sl
logging python structured-logging
Last synced: 3 months ago
JSON representation
logging to structured logging
- Host: GitHub
- URL: https://github.com/pmeier/l2sl
- Owner: pmeier
- License: bsd-3-clause
- Created: 2025-03-20T21:04:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-22T16:48:27.000Z (5 months ago)
- Last Synced: 2026-01-23T09:48:49.697Z (5 months ago)
- Topics: logging, python, structured-logging
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# l2sl
## What is this?
`l2sl` funnels log records of third-party tools into your [`structlog`] pipeline. In
addition, `l2sl` converts the text based log records into a structured representation.
## Why do I need it?
You need `l2sl` if
- you are using [`structlog`] as the logging library in your application,
- you depend on third-party libraries, e.g.
[`uvicorn`](https://github.com/encode/uvicorn) or
[`httpx`](https://github.com/encode/httpx), that use the `logging` module from the
standard library for logging, and
- you want the log records from the third-party libraries processed by the same
[`structlog`] pipeline as your own log records.
## How do I get started?
In the most minimal setup, you only need to do add one thing to your logging setup,
preferably after the `structlog.configure()` call:
```python
import l2sl
l2sl.configure_stdlib_log_forwarding()
```
## How do I learn more?
Please have a look at the [documentation](https://l2sl.readthedocs.io/en/stable/).
[`structlog`]: https://www.structlog.org/