Skip to main content

Human readable formatter for JSON logs.

Project description

jsonlog-cli

A human readable formatter for JSON logs.

It's built for use with jsonlog but will work well with any log format that uses line delimited JSON.

Example output

Usage

Pass a file as the only argument to jsonlog, or read from STDIN by default.

jsonlog docs/example.log
python docs/example.py | jsonlog

Configuration

See jsonlog --help for all options.

Only show timestamps and messages (defaults to {timestamp} {level} {name} {message}).

jsonlog --format "{timestamp} {message}" docs/example.log

Configure the keys of multiline values you want to display (can be specified multiple times, and defaults to the traceback key.)

jsonlog --format "{timestamp} {message}" docs/example.log

Configure the key to extract and use as the records level, controlling the colour each line is printed in (defaults to the level key).

jsonlog --format "{timestamp} {message}" docs/example.log

Authors

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

jsonlog-cli-3.1.0.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

jsonlog_cli-3.1.0-py2.py3-none-any.whl (10.7 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