Skip to main content

A structured JSON logger that seamlessly interoperates with AWS Cloudwatch and other AWS services (e.g. Lambda)

Project description

Overview

This package provides structured logging faculties designed to facilitate easy log querying in CloudWatch. These faculties are provided via extension of the native python logging libary. In addition to provided access to JSON formatted logging through native python logging syntax, this package also provides AWS Service (e.g. Lambda) specific LoggerAdapaters that allow for the easy addition of runtime specific metadata (e.g. Lambda requestId, ECS task id, etc). Once created, the logger can be easily used with: logger.info("msg", extra={"field_name": "field_value"})

Example

Use like this:

from cloudwatch_logging import CloudwatchLogging

# Setup logging
LOGGER = CloudwatchLogging.getLogger("your_logger_name")

Development

Setup

This is a pure Python library; it can easily be installed using pip install cloudwatch_logging

Test

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

cloudwatch-logging-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

cloudwatch_logging-0.0.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file cloudwatch-logging-0.0.2.tar.gz.

File metadata

  • Download URL: cloudwatch-logging-0.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.3

File hashes

Hashes for cloudwatch-logging-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fc46b6eacffc88170f754401cdf715c44835f20ed006b9da636a66d0f3cb235f
MD5 ac65bc269826a8d7305ba19a72671bc9
BLAKE2b-256 3a8c69f74cab20fa9af3abdfc9b8f23d378533dc6a0e02965783d61ecfe2a8da

See more details on using hashes here.

File details

Details for the file cloudwatch_logging-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: cloudwatch_logging-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.3

File hashes

Hashes for cloudwatch_logging-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e87265d006256a73bdc50e71d8a92410076c9f7b17febf6aee922a23f528c246
MD5 3794f5345986490920126f63c8950a12
BLAKE2b-256 a0041c43649d251a8c2dfa70063e488603f2a253c9da53d7bf31b409d64afaed

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