Skip to main content
https://img.shields.io/travis/opbeat/python-logging-json-formatter.svg https://img.shields.io/pypi/v/python-logging-json-formatter.svg

A logging Formatter that appends extra data as JSON, e.g. for loggly

USAGE

Using dictConfig

import logging.config

logging.config.dictConfig({
    'version': 1,
    'formatters': {
        'append_json': {
            '()': 'logging_json_formatter.AppendJSONFormatter',
            'format': '%(asctime)s %(name)s %(levelname)s %(funcName)s  %(filename)s:%(lineno)s %(message)s',

            # only use a specific set of keys
            'limit_keys_to': ['org_uuid', 'app_uuid'],

            # force keys that are ignored by default
            'force_keys': ('levelname', 'lineno'),
        }
    },
    'handlers': {
        'syslog': {
            'level': 'ERROR',
            'class': 'logging.handlers.SysLogHandler'
            'address': '/dev/log',
            'formatter': 'append_json'
        },
    },
}

Metadata

Release files for python-logging-json-formatter 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-logging-json-formatter 0.1.0
File Size Uploaded
python-logging-json-formatter-0.1.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-logging-json-formatter 0.1.0
File Interpreter ABI Platform
python_logging_json_formatter-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 8.9 kB

Release files / python-logging-json-formatter-0.1.0.tar.gz

Download URL python-logging-json-formatter-0.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
39078cb87291bfdcda6e763eb33c87250080414fcc23f86f68a97b50d9391e61
BLAKE2b-256 checksum
How to use checksums
e82f116a7d04351cf1e2a428eabd4b0ea0ee8520b45cece163fded796900ac20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / python_logging_json_formatter-0.1.0-py2.py3-none-any.whl

Download URL python_logging_json_formatter-0.1.0-py2.py3-none-any.whl
Size 4.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
92a1de38130580516e5cde9fdb4fb32dbca3b36905e811c22562662b309f8c8e
BLAKE2b-256 checksum
How to use checksums
c6e82d1a7a117eef998cb299749d590ed2b7339ed9c0fa8c6c88df4394bf8c1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page