Skip to main content

Make your python logging more structured and easy to aggregate

Project description

Documentation Status Coverage Status Build Status

Pysllo

Make your python logging more structured and easy to aggregate using all features of pysllo. Pysllo is set of useful python logging extenders that make possible saving logs into StackLight with possibility of flow tracking, data binding and raising all logs if error occurs.

For more information go to documentation on ReadTheDocs.

Quick start

pip install pysllo

Features

  • StructuredLogger

  • PropagationLogger

  • TrackingLogger

  • JsonFormatter

  • ElasticSearchUDPHandler

Example

from pysllo.handlers import ElasticSearchUDPHandler
from pysllo.formatters import JsonFormatter
from pysllo.utils import LoggersFactory

# configuration
host, port, limit = 'localhost', 9000
handler = ElasticSearchUDPHandler([(host, port)])
formatter = JsonFormatter()
handler.setFormatter(formatter)
MixedLogger = LoggersFactory.make(
        tracking_logger=True,
        propagation_logger=True,
        structured_logger=True
    )
logger = MixedLogger('test')
logger.addHandler(handler)

# examlpe usage
msg = "TEST"
logger.bind(ip='127.0.0.1')
logger.debug(msg, user=request.user)

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

pysllo-0.1.tar.gz (7.7 kB view details)

Uploaded Source

File details

Details for the file pysllo-0.1.tar.gz.

File metadata

  • Download URL: pysllo-0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pysllo-0.1.tar.gz
Algorithm Hash digest
SHA256 6188044739e361fddc60d8b0924fdf125c3a21455844d099870214601bbe78ee
MD5 bbd072f1d368d87fdcea570e19deeb45
BLAKE2b-256 2f6a0fef289c0b297d12d9926c6dbd835965e1668fe735470ce2b250cc5e8acb

See more details on using hashes here.

Supported by

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