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


Release history Release notifications

Download files

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

Files for structlogger, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size structlogger-0.1.3-py3-none-any.whl (6.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size structlogger-0.1.3.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page