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.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logfmt-0.1-py2.py3-none-any.whl (2.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for logfmt-0.1.tar.gz
Algorithm Hash digest
SHA256 f21bbf6d282e477067172f4a01810cfbbdea8b23bbeac589a27bed301253ae76
MD5 9664746e46b77be62702605374e4e29d
BLAKE2b-256 9f468c296820c6b3a1ed2f4cb221cd78d81a13d59ac47025532503f2039f6937

See more details on using hashes here.

File details

Details for the file logfmt-0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for logfmt-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 015ebe48f9c1e203f242efcbb35f1934760b468243e6b4c8e3d5aedf134a04b7
MD5 0d27344b4d9ed6d5c0f51e2a03032cc0
BLAKE2b-256 471ae3525948b1481552b7fb66bcef9ad33ae9927cd977b1c2ded4613e2e4ded

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