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
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)
Built Distribution
jsonlf-0.1.3-py3-none-any.whl
(3.4 kB
view hashes)