Skip to main content

Structured logging for Python.

Project description

Latest Version https://travis-ci.org/hynek/structlog.svg?branch=master https://coveralls.io/repos/hynek/structlog/badge.svg?branch=master

structlog makes structured logging in Python easy by augmenting your existing logger. It allows you to split your log entries up into key/value pairs and build them incrementally without annoying boilerplate code.

>>> from structlog import get_logger
>>> log = get_logger()
>>> log = log.bind(user='anonymous', some_key=23)
>>> log = log.bind(user='hynek', another_key=42)
>>> log.info('user.logged_in', happy=True)
some_key=23 user='hynek' another_key=42 happy=True event='user.logged_in'

It’s dual-licensed under Apache License, version 2 and MIT, available from PyPI, the source code can be found on GitHub, the documentation at http://www.structlog.org/.

structlog targets Python 2.6, 2.7, 3.3, 3.4, and PyPy with no additional dependencies for core functionality.

If you need any help, visit us on #structlog on Freenode!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

structlog-15.2.0.tar.gz (68.0 kB view details)

Uploaded Source

Built Distribution

structlog-15.2.0-py2.py3-none-any.whl (26.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file structlog-15.2.0.tar.gz.

File metadata

  • Download URL: structlog-15.2.0.tar.gz
  • Upload date:
  • Size: 68.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for structlog-15.2.0.tar.gz
Algorithm Hash digest
SHA256 fbd9cac9537dd2370a2d8580113e5a02b8b136b7c2fb9d25c476ef4d220b16b5
MD5 245dcd145d14e7633e3d089cebcaf327
BLAKE2b-256 47e073d623659b817f12070e6ec0ecf5aeee1f41b9b7e68d32fe33c124c5a859

See more details on using hashes here.

File details

Details for the file structlog-15.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for structlog-15.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 168559f026626d5f2522bd41e0564008dccd33cf4921fcc6fd611ba4c7c9eed2
MD5 5c8a2a38c21933a095d85617c928f963
BLAKE2b-256 a9fcbfe3c17e40abaf32b2dfcaf4b3e46dcd36598a613ee017aed87814e19428

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page