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 details)
Built Distribution
File details
Details for the file jsonlf-0.1.3.tar.gz
.
File metadata
- Download URL: jsonlf-0.1.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.2 Linux/5.15.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c36bbfac140f055ebabfa2cd99ecf24431d4f39d6932f6242f78c60125fc2f75 |
|
MD5 | 50062a6d8b2c9690b8b03ca476c0a2a4 |
|
BLAKE2b-256 | a0e76f7b68a9e6b790941fe00fa9b839084a7e0e51b026cb6730398953d15c57 |
File details
Details for the file jsonlf-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: jsonlf-0.1.3-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.2 Linux/5.15.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80889300853fea4260584af173ba8ac63577742cafafa6781a7315818d85170c |
|
MD5 | fed7367452f20f589584a3d50da80d90 |
|
BLAKE2b-256 | c81d8c3e66086637de90e69753a144b487320369876ad3f05779cf5a430e838d |