Skip to main content

Uses structlog to create two loggers, a stdout logger with key-value args and optional colour, and a file logger in JSON format with log-rotation.

Project description

Compatibility Implementations Format Code_Style

Uses structlog to create two loggers, a stdout logger with key-value args and optional colour, and a file logger in JSON format with log-rotation.

Documentation

StructLogger’s documentation can be found at https://structlogger.readthedocs.io

Installing StructLogger

StructLogger can be installed from Pypi using pip:

pip install structlogger

Example

StructLogger defines a set of standard parameters that should get you going quickly and easily. Settings are retrofitted to the standard logging module to ensure any of your dependencies will adhere to the same logging format.

import structlog
from structlogger import configure_logger, __version__

configure_logger()

log = structlog.getLogger()

log.info('Welcome to structlogger', version=__version__)

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

structlogger-0.1.4.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

structlogger-0.1.4-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file structlogger-0.1.4.tar.gz.

File metadata

  • Download URL: structlogger-0.1.4.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for structlogger-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b6a46715e27e63a9e63615e3030ddca81363aaf68e718f2910fdd0662395c9dd
MD5 ff6f14b02254452d2ce0cdccf9913f0b
BLAKE2b-256 309899f3748053dcda67875f08a1d070eba93f7948a7ce9962c8dad111f995f0

See more details on using hashes here.

File details

Details for the file structlogger-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: structlogger-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for structlogger-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 99a3ebfe14e28e6765599a3b50ab809e252551ab9ce2f8b57e77c7d7e5f72af7
MD5 13578029b96853bfd3be2145d6051224
BLAKE2b-256 6ca07ea95c52224b93eeb985c137890f7c176a924c5a871acf48b1112eebf695

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