@sylvanas-cry/json-lines-colorize
v1.2.3
Published
Colorizes the JSON-strings input stream (stdin).
Downloads
4
Maintainers
Readme
json-lines-colorize
Colorizes the JSON-strings input stream (stdin).
Installation
npm install -g @sylvanas-cry/json-lines-colorize
Usage
<output_stream> | jlc [options]
Where options is:
-c, --comma
— add comma to the end of every JSON object-n, --no-pretty
— disable pretty-print of JSON objects-o, --override <property>,<value>,<hex-color>
— replaces property name and string literal colors with givenhex-color
if JSON object hasproperty
withvalue
Examples
echo '{"foo":"bar"}' | jlc
echo '{"level":"error","message":"error"}\n{"level":"log","message":"ok"}' | \
jlc -o level,error,ff0000
echo '{"a":"b"}\n{"c":"d"}' | jlc -o a,b,ff0000 -o c,d,\#00FF00
tail -f /var/log/my-service.log | jlc -n -c
kubectl logs -n my-namespace --follow my-pod | jlc
License
The scripts and documentation in this project are released under the MIT License.