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

Uploaded Source

Built Distribution

structlogger-0.1.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: structlogger-0.1.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.11.4 CPython/3.6.6 Linux/4.17.11-200.fc28.x86_64

File hashes

Hashes for structlogger-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6c96d6384b22828e00b452dc2ff7c363f53408739658699ca57d8a43843da92d
MD5 1425d3af68d8f63668e2200f1f0472ed
BLAKE2b-256 570184cfc566837b2ee4f171083bb6b5b7df52b776c6e272ee1abce0a090b464

See more details on using hashes here.

File details

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

File metadata

  • Download URL: structlogger-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.11.4 CPython/3.6.6 Linux/4.17.11-200.fc28.x86_64

File hashes

Hashes for structlogger-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea62dfa06566fd96c248b2bc2d4ce9b9dc384b7624c2c22ef6ac4da8d0f6693
MD5 b2ba6ed82e8b0abcf7ad448cc26ebb79
BLAKE2b-256 5f1f53c71b8763147152d56adaf77b441d410c5399eac685b7cb632325510a12

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