Skip to main content

Parse log lines in the logfmt style.

Project description

https://secure.travis-ci.org/jkakar/logfmt-python.png?branch=master

Logfmt

Python package for parsing log lines in the logfmt style. See the original project by Blake Mizerany and Keith Rarick for information about logfmt conventions and use: https://github.com/kr/logfmt

Using logfmt

Easily process lines from logfmt formatted input:

from logfmt import parse

input = StringIO('\n'.join(['key1=value1', 'key2=value2']))
for values in parse(input):
    print values

This program produces this output:

{'key1': 'value1'}
{'key2': 'value2'}

Installation

To install it, simply:

pip install logfmt

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

logfmt-0.2.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file logfmt-0.2.tar.gz.

File metadata

  • Download URL: logfmt-0.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for logfmt-0.2.tar.gz
Algorithm Hash digest
SHA256 04a5c41cb8b7eae9583d156afa154f5ca20713b9993f286300de1d7cc42616d3
MD5 c2d848792116431bf61dcc2b86eb4de9
BLAKE2b-256 c32d6c39312cbe3f61866eaae4139b4aae6d10e5d021c8c47a38962f03f0070b

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