Parse json logs output from uber-go/zap library nicely
Project description
sugarjazy - parse json logs nicely
sugarjazy is a simple tool to parse json logs and output them in a nice format with nice colors.
Usually play nicely with https://github.com/uber-go/zap when using the "Sugar" log.
Installation
pip3 install -U sugarjazy
python-dateutil
is an optional dependency, if the package is not installed you will not be be able to show the log timestamps.
Screenshot
Usage
% sugarjazy --help
usage: jazy [-h] [--timeformat TIMEFORMAT] [--regexp-highlight REGEXP_HIGHLIGHT] [--regexp-color REGEXP_COLOR] [--hide-timestamp] [files ...]
positional arguments:
files
options:
-h, --help show this help message and exit
--timeformat TIMEFORMAT
timeformat default only to the hour minute. Use "%Y-%m-%d %H:%M:%S" if you want to add the year
--regexp-highlight REGEXP_HIGHLIGHT, -r REGEXP_HIGHLIGHT
Highlight a regexp in message, for example: \"Failed:\s*\d+, Cancelled\s*\d+\"
--regexp-color REGEXP_COLOR
Regexp highlight color
--hide-timestamp, -H don't show timestamp
Copyright
Authors
Chmouel Boudjnah <@chmouel>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sugarjazy-0.2.0.tar.gz
(7.3 kB
view hashes)
Built Distribution
sugarjazy-0.2.0-py3-none-any.whl
(11.8 kB
view hashes)
Close
Hashes for sugarjazy-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f524236e53ed5b1ebb475af94d67f7f5b77d7f353be16e5c2e783ddbe3a1271 |
|
MD5 | ea9b461093242402b9c01f4ab118099b |
|
BLAKE2b-256 | 395ec93d5b64778717626891015628c3e571dac8ddc929ce62bea1b106f2af98 |