Metadata-Version: 2.1
Name: structlog
Version: 23.1.0
Summary: Structured Logging for Python
Project-URL: Documentation, https://www.structlog.org/
Project-URL: Changelog, https://www.structlog.org/en/stable/changelog.html
Project-URL: Bug Tracker, https://github.com/hynek/structlog/issues
Project-URL: Source Code, https://github.com/hynek/structlog
Project-URL: Funding, https://github.com/sponsors/hynek
Project-URL: Tidelift, https://tidelift.com/subscription/pkg/pypi-structlog?utm_source=pypi-structlog&utm_medium=pypi
Author-email: Hynek Schlawack <hs@ox.cx>
License: Licensed under either of
        
        - Apache License, Version 2.0 (LICENSE-APACHE or <https://choosealicense.com/licenses/apache/>)
        - or MIT license (LICENSE-MIT or <https://choosealicense.com/licenses/mit/>)
        
        at your option.
        
        Any contribution intentionally submitted for inclusion in the work by you, as
        defined in the Apache-2.0 license, shall be dual-licensed as above, without any
        additional terms or conditions.
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
License-File: NOTICE
Keywords: log,logging,structure,structured
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Logging
Requires-Python: >=3.7
Requires-Dist: importlib-metadata; python_version < '3.8'
Requires-Dist: typing-extensions; python_version < '3.8'
Provides-Extra: dev
Requires-Dist: structlog[docs,tests,typing]; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo; extra == 'docs'
Requires-Dist: myst-parser; extra == 'docs'
Requires-Dist: sphinx; extra == 'docs'
Requires-Dist: sphinx-notfound-page; extra == 'docs'
Requires-Dist: sphinxcontrib-mermaid; extra == 'docs'
Requires-Dist: twisted; extra == 'docs'
Provides-Extra: tests
Requires-Dist: coverage[toml]; extra == 'tests'
Requires-Dist: freezegun>=0.2.8; extra == 'tests'
Requires-Dist: pretend; extra == 'tests'
Requires-Dist: pytest-asyncio>=0.17; extra == 'tests'
Requires-Dist: pytest>=6.0; extra == 'tests'
Requires-Dist: simplejson; extra == 'tests'
Provides-Extra: typing
Requires-Dist: mypy; extra == 'typing'
Requires-Dist: rich; extra == 'typing'
Requires-Dist: twisted; extra == 'typing'
Description-Content-Type: text/markdown

<p align="center">
    <img
        src="https://www.structlog.org/en/stable/_static/structlog_logo_small_transparent.png"
        alt="structlog mascot"
    />
</p>

*structlog* is *the* production-ready logging solution for Python:

- **Simple**: At its core, everything is about **functions** that take and return **dictionaries** – all hidden behind **familiar APIs**.
- **Powerful**: Functions and dictionaries aren’t just simple, they’re also powerful.
  *structlog* leaves *you* in control.
- **Fast**: *structlog* is not hamstrung by designs of yore.
  Its flexibility comes not at the price of performance.

Thanks to its flexible design, *you* choose whether you want *structlog* to take care of the **output** of your log entries or whether you prefer to **forward** them to an existing logging system like the standard library's `logging` module.

The output format is just as flexible and *structlog* comes with support for JSON, [*logfmt*](https://brandur.org/logfmt), as well as pretty console output out-of-the-box:

[![image](https://github.com/hynek/structlog/blob/main/docs/_static/console_renderer.png?raw=true)](https://github.com/hynek/structlog/blob/main/docs/_static/console_renderer.png?raw=true)


## Sponsors

*structlog* would not be possible without our [amazing sponsors](https://github.com/sponsors/hynek).
Especially those generously supporting us at the *The Organization* tier and higher:

<p align="center">
   <a href="https://www.variomedia.de/">
      <img src="https://raw.githubusercontent.com/hynek/structlog/main/.github/sponsors/Variomedia.svg" width="200" height="60"></img>
   </a>

   <a href="https://tidelift.com/subscription/pkg/pypi-structlog?utm_source=pypi-structlog&utm_medium=referral&utm_campaign=readme">
      <img src="https://raw.githubusercontent.com/hynek/structlog/main/.github/sponsors/Tidelift.svg" width="200" height="60"></img>
   </a>

   <a href="https://sentry.io/">
      <img src="https://raw.githubusercontent.com/hynek/structlog/main/.github/sponsors/Sentry.svg" width="200" height="60"></img>
   </a>

   <a href="https://filepreviews.io/">
      <img src="https://raw.githubusercontent.com/hynek/structlog/main/.github/sponsors/FilePreviews.svg" width="200" height="60"></img>
   </a>
</p>

<p align="center">
   <strong>Please consider <a href="https://github.com/sponsors/hynek">joining them</a> to help make <em>structlog</em>’s maintenance more sustainable!</strong>
</p>

---

<!-- continue-short -->

*structlog* has been successfully used in production at every scale since **2013**, while embracing cutting-edge technologies like *asyncio*, context variables, or type hints as they emerged.
Its paradigms proved influential enough to [help design](https://twitter.com/sirupsen/status/638330548361019392) structured logging [packages across ecosystems](https://github.com/sirupsen/logrus).

## Project Information

- **License**: *dual* [Apache License, version 2 **and** MIT](https://www.structlog.org/en/latest/license.html)
- **Get Help**: please use the *structlog* tag on [*Stack Overflow*](https://stackoverflow.com/questions/tagged/structlog)
- **Supported Python Versions**: 3.7 and later
- [**PyPI**](https://pypi.org/project/structlog/)
- [**Source Code**](https://github.com/hynek/structlog)
- [**Documentation**](https://www.structlog.org/)
- [**Changelog**](https://www.structlog.org/en/stable/changelog.html)
- [**Third-party Extensions**](https://github.com/hynek/structlog/wiki/Third-party-Extensions)


## *structlog* for Enterprise

Available as part of the Tidelift Subscription.

The maintainers of *structlog* and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/pypi-structlog?utm_source=pypi-structlog&utm_medium=referral&utm_campaign=readme)


## Release Information

### Added

- `structlog.stdlib.BoundLogger` now has, analogously to our native logger, a full set of async log methods prefixed with an `a`: `await log.ainfo("event!")`
  [#502](https://github.com/hynek/structlog/issues/502)

- The default configuration now respects the presence of `FORCE_COLOR` (regardless of its value, unless an empty string).
  This disables all heuristics whether it makes sense to use colors.
  [#503](https://github.com/hynek/structlog/issues/503)

- The default configuration now respects the presence of [`NO_COLOR`](https://no-color.org) (regardless of its value, unless an empty string).
  This disables all heuristics whether it makes sense to use colors and overrides `FORCE_COLOR`.
  [#504](https://github.com/hynek/structlog/issues/504)


### Fixed

- ConsoleRenderer now reuses the `_figure_out_exc_info` to process the `exc_info` argument like `ExceptionRenderer` does.
  This prevents crashes if the actual Exception is passed for the *exc_info* argument instead of a tuple or `True`.
  [#482](https://github.com/hynek/structlog/issues/482)

- `FilteringBoundLogger.aexception()` now extracts the exception info using `sys.exc_info()` before passing control to the asyncio executor (where original exception info is no longer available).
  [#488](https://github.com/hynek/structlog/issues/488)


---

[Full changelog](https://www.structlog.org/en/stable/changelog.html)


## Credits

*structlog* is written and maintained by [Hynek Schlawack](https://hynek.me/).
The idea of bound loggers is inspired by previous work by [Jean-Paul Calderone](https://github.com/exarkun) and [David Reid](https://github.com/dreid).

The development is kindly supported by my employer [Variomedia AG](https://www.variomedia.de/), *structlog*’s [Tidelift subscribers](https://tidelift.com/subscription/pkg/pypi-structlog?utm_source=pypi-structlog&utm_medium=referral&utm_campaign=readme), and all my amazing [GitHub Sponsors](https://github.com/sponsors/hynek).

A full list of contributors can be found in GitHub’s [overview](https://github.com/hynek/structlog/graphs/contributors).

The logs-loving futuristic beaver logo has been contributed by [Russell Keith-Magee](https://github.com/freakboy3742).


