Metadata-Version: 2.4
Name: l2sl
Version: 0.4.0
Summary: logging to structured logging
Author-email: Philip Meier <github.pmeier@posteo.de>
License: BSD 3-Clause License
        
        Copyright (c) 2025, Philip Meier
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Repository, https://github.com/pmeier/l2sl
Project-URL: Documentation, https://l2sl.readthedocs.io/en/stable/
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: structlog>=25.2.0
Requires-Dist: typing-extensions; python_version < "3.11"
Dynamic: license-file

# 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/
