Skip to main content

Convert structured JSON logs to human-readable output

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

Uploaded Source

Built Distribution

jsonlog_cli-5.0.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file jsonlog-cli-5.0.0.tar.gz.

File metadata

  • Download URL: jsonlog-cli-5.0.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.4.0-28-generic

File hashes

Hashes for jsonlog-cli-5.0.0.tar.gz
Algorithm Hash digest
SHA256 c2631f760f3a4f0eb7f50086178c40b5f07988d6a5a542a608bdf0cfce5d3fa3
MD5 720aa850c74737c1629d2c5ecc2a9c63
BLAKE2b-256 bcfab3f109c015b2790edfe7838cb2d4b067d4def3bc05dce9e9e3885999d356

See more details on using hashes here.

File details

Details for the file jsonlog_cli-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: jsonlog_cli-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.4.0-28-generic

File hashes

Hashes for jsonlog_cli-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5a4f68a4dc2463054c9050bcc109365443f48005b7aeea4755ba6fd4c4d483c
MD5 c39ff763cc3488fd79fd1c759140db9f
BLAKE2b-256 dd181885d0526b0048c37a7e0f31b6d961a091992b958ba103eaedb75e4134bc

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