structlog


Namestructlog JSON
Version 24.1.0 PyPI version JSON
download
home_page
SummaryStructured Logging for Python
upload_time2024-01-08 09:52:54
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords log logging structure structured
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <img
        src="https://www.structlog.org/en/stable/_static/structlog_logo_small.png"
        alt="structlog mascot"
    />
</p>

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

- **Simple**: Everything is about **functions** that take and return **dictionaries** – all hidden behind **familiar APIs**.
- **Powerful**: Functions and dictionaries aren’t just simple but 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" /></a>
   <a href="https://tidelift.com/?utm_source=lifter&utm_medium=referral&utm_campaign=hynek"><img src="https://raw.githubusercontent.com/hynek/structlog/main/.github/sponsors/Tidelift.svg" width="200" height="60" /></a>
   <a href="https://filepreviews.io/"><img src="https://raw.githubusercontent.com/hynek/structlog/main/.github/sponsors/FilePreviews.svg" width="200" height="60" /></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 Links

- [**Get Help**](https://stackoverflow.com/questions/tagged/structlog) (use the *structlog* tag on Stack Overflow)
- [**PyPI**](https://pypi.org/project/structlog/)
- [**GitHub**](https://github.com/hynek/structlog)
- [**Documentation**](https://www.structlog.org/)
- [**Changelog**](https://github.com/hynek/structlog/tree/main/CHANGELOG.md)
- [**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/?utm_source=lifter&utm_medium=referral&utm_campaign=hynek)


## Release Information

### Fixed

- The lazy logger proxy returned by `structlog.get_logger()` now returns its initial values when asked for context.
  When asked for context before binding for the first time, it returned an empty dictionary in 23.3.0.

- The displayed level name when using `structlog.stdlib.BoundLogger.exception()` is `"error"` instead of `"exception"`.
  Fixes regression in 23.3.0.
  [#584](https://github.com/hynek/structlog/issues/584)

- Don't ignore the `width` argument of `RichTracebackFormatter`.
  [#587](https://github.com/hynek/structlog/issues/587)


---

[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/?utm_source=lifter&utm_medium=referral&utm_campaign=hynek), and all my amazing [GitHub Sponsors](https://github.com/sponsors/hynek).

The logs-loving beaver logo has been contributed by [Lynn Root](https://www.roguelynn.com).



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "structlog",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "log,logging,structure,structured",
    "author": "",
    "author_email": "Hynek Schlawack <hs@ox.cx>",
    "download_url": "https://files.pythonhosted.org/packages/d1/ac/87aedb7a9ba52f645b9d29a7f48bb12a5c6b7e204b8137549fbe4754b563/structlog-24.1.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n    <img\n        src=\"https://www.structlog.org/en/stable/_static/structlog_logo_small.png\"\n        alt=\"structlog mascot\"\n    />\n</p>\n\n*structlog* is *the* production-ready logging solution for Python:\n\n- **Simple**: Everything is about **functions** that take and return **dictionaries** \u2013 all hidden behind **familiar APIs**.\n- **Powerful**: Functions and dictionaries aren\u2019t just simple but also powerful.\n  *structlog* leaves *you* in control.\n- **Fast**: *structlog* is not hamstrung by designs of yore.\n  Its flexibility comes not at the price of performance.\n\nThanks 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.\n\nThe 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:\n\n[![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)\n\n\n## Sponsors\n\n*structlog* would not be possible without our [amazing sponsors](https://github.com/sponsors/hynek).\nEspecially those generously supporting us at the *The Organization* tier and higher:\n\n<p align=\"center\">\n   <a href=\"https://www.variomedia.de/\"><img src=\"https://raw.githubusercontent.com/hynek/structlog/main/.github/sponsors/Variomedia.svg\" width=\"200\" height=\"60\" /></a>\n   <a href=\"https://tidelift.com/?utm_source=lifter&utm_medium=referral&utm_campaign=hynek\"><img src=\"https://raw.githubusercontent.com/hynek/structlog/main/.github/sponsors/Tidelift.svg\" width=\"200\" height=\"60\" /></a>\n   <a href=\"https://filepreviews.io/\"><img src=\"https://raw.githubusercontent.com/hynek/structlog/main/.github/sponsors/FilePreviews.svg\" width=\"200\" height=\"60\" /></a>\n</p>\n\n<p align=\"center\">\n   <strong>Please consider <a href=\"https://github.com/sponsors/hynek\">joining them</a> to help make <em>structlog</em>\u2019s maintenance more sustainable!</strong>\n</p>\n\n---\n\n<!-- continue-short -->\n\n*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.\nIts paradigms proved influential enough to [help design](https://twitter.com/sirupsen/status/638330548361019392) structured logging [packages across ecosystems](https://github.com/sirupsen/logrus).\n\n## Project Links\n\n- [**Get Help**](https://stackoverflow.com/questions/tagged/structlog) (use the *structlog* tag on Stack Overflow)\n- [**PyPI**](https://pypi.org/project/structlog/)\n- [**GitHub**](https://github.com/hynek/structlog)\n- [**Documentation**](https://www.structlog.org/)\n- [**Changelog**](https://github.com/hynek/structlog/tree/main/CHANGELOG.md)\n- [**Third-party Extensions**](https://github.com/hynek/structlog/wiki/Third-party-Extensions)\n\n\n## *structlog* for Enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe 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/?utm_source=lifter&utm_medium=referral&utm_campaign=hynek)\n\n\n## Release Information\n\n### Fixed\n\n- The lazy logger proxy returned by `structlog.get_logger()` now returns its initial values when asked for context.\n  When asked for context before binding for the first time, it returned an empty dictionary in 23.3.0.\n\n- The displayed level name when using `structlog.stdlib.BoundLogger.exception()` is `\"error\"` instead of `\"exception\"`.\n  Fixes regression in 23.3.0.\n  [#584](https://github.com/hynek/structlog/issues/584)\n\n- Don't ignore the `width` argument of `RichTracebackFormatter`.\n  [#587](https://github.com/hynek/structlog/issues/587)\n\n\n---\n\n[Full Changelog \u2192](https://www.structlog.org/en/stable/changelog.html)\n\n\n## Credits\n\n*structlog* is written and maintained by [Hynek Schlawack](https://hynek.me/).\nThe idea of bound loggers is inspired by previous work by [Jean-Paul Calderone](https://github.com/exarkun) and [David Reid](https://github.com/dreid).\n\nThe development is kindly supported by my employer [Variomedia AG](https://www.variomedia.de/), *structlog*\u2019s [Tidelift subscribers](https://tidelift.com/?utm_source=lifter&utm_medium=referral&utm_campaign=hynek), and all my amazing [GitHub Sponsors](https://github.com/sponsors/hynek).\n\nThe logs-loving beaver logo has been contributed by [Lynn Root](https://www.roguelynn.com).\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Structured Logging for Python",
    "version": "24.1.0",
    "project_urls": {
        "Changelog": "https://github.com/hynek/structlog/blob/main/CHANGELOG.md",
        "Documentation": "https://www.structlog.org/",
        "Funding": "https://github.com/sponsors/hynek",
        "GitHub": "https://github.com/hynek/structlog",
        "Mastodon": "https://mastodon.social/@hynek",
        "Tidelift": "https://tidelift.com?utm_source=lifter&utm_medium=referral&utm_campaign=hynek",
        "Twitter": "https://twitter.com/hynek"
    },
    "split_keywords": [
        "log",
        "logging",
        "structure",
        "structured"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ae5cc22ca8b8715dd625bbdd6bc7ec87395e29940642d8dff213fad1aa8ce84d",
                "md5": "ccff454c0e272620654fb74b41e97ec5",
                "sha256": "3f6efe7d25fab6e86f277713c218044669906537bb717c1807a09d46bca0714d"
            },
            "downloads": -1,
            "filename": "structlog-24.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ccff454c0e272620654fb74b41e97ec5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 65692,
            "upload_time": "2024-01-08T09:52:50",
            "upload_time_iso_8601": "2024-01-08T09:52:50.990712Z",
            "url": "https://files.pythonhosted.org/packages/ae/5c/c22ca8b8715dd625bbdd6bc7ec87395e29940642d8dff213fad1aa8ce84d/structlog-24.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1ac87aedb7a9ba52f645b9d29a7f48bb12a5c6b7e204b8137549fbe4754b563",
                "md5": "1c069bcbbe3e3e8f416a5c242e952d64",
                "sha256": "41a09886e4d55df25bdcb9b5c9674bccfab723ff43e0a86a1b7b236be8e57b16"
            },
            "downloads": -1,
            "filename": "structlog-24.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1c069bcbbe3e3e8f416a5c242e952d64",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1340948,
            "upload_time": "2024-01-08T09:52:54",
            "upload_time_iso_8601": "2024-01-08T09:52:54.240227Z",
            "url": "https://files.pythonhosted.org/packages/d1/ac/87aedb7a9ba52f645b9d29a7f48bb12a5c6b7e204b8137549fbe4754b563/structlog-24.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-08 09:52:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hynek",
    "github_project": "structlog",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "structlog"
}
        
Elapsed time: 0.15954s