Skip to main content

Pretty print a stream of json lines. You can pipe any command that is logging jsonl into this. If the line is not a json it will print as it is.

Project description

Pypi

jsonlf

This is a json line formarter. It expects a valid json on stdin and outputs it pretty-printed and uses pygments for highlighting. It will also attempt to format python tracebacks.

Installation

pip install jsonlf

Usage

some_command_that_logs_json_lines | jsonlf

You can use pygments styles listed here: https://pygments.org/styles/ Just pass their names as the first argument. Example:

some_command_that_logs_json_lines | jsonlf emacs

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

jsonlf-0.1.3.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

jsonlf-0.1.3-py3-none-any.whl (3.4 kB view hashes)

Uploaded 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