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.5.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: structlogger-0.1.5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for structlogger-0.1.5.tar.gz
Algorithm Hash digest
SHA256 129385572c5f6d8b75920fbd72c815ee0dba2e7e3b1b3a7933ac437b86c636e2
MD5 49a68abedd2c23b7027943e96b59fb6a
BLAKE2b-256 f24ff3008b40ebf6e483ccae06b9deee94d293dca8a6c4a165ee71ac0e6afe67

See more details on using hashes here.

File details

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

File metadata

  • Download URL: structlogger-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for structlogger-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f46edf422ab819cf9f1bbdb7181963b3775b9e45fc03d175d1af453664bc16d1
MD5 abcb5a64efd197f1edcc699dc9c104ba
BLAKE2b-256 f0bd92b2bc44657d7cf1817747ab98b1d50b14591a2e95e7dbb27c79d4c86201

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