Skip to main content

Logging formatters for ECS in Python

Project description

ecs-logging-python

Please note that this is library is in a beta version and backwards-incompatible changes might be introduced in future releases.

Installation

python -m pip install ecs-logging

Getting Started

import logging
import ecs_logging

# Get the Logger
logger = logging.getLogger("app")
logger.setLevel(logging.DEBUG)

# Add an ECS formatter to the Handler
handler = logging.StreamHandler()
handler.setFormatter(ecs_logging.StdlibFormatter())
logger.addHandler(handler)

# Emit a log! :)
logger.debug("Example message!")

License

Apache-2.0

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

ecs-logging-0.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

ecs_logging-0-py2.py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 2 Python 3

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