1.2.3 • Published 2 years ago
@sylvanas-cry/json-lines-colorize v1.2.3
json-lines-colorize
Colorizes the JSON-strings input stream (stdin).
Installation
npm install -g @sylvanas-cry/json-lines-colorizeUsage
<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-colorif JSON object haspropertywithvalue
Examples
echo '{"foo":"bar"}' | jlcecho '{"level":"error","message":"error"}\n{"level":"log","message":"ok"}' | \
jlc -o level,error,ff0000echo '{"a":"b"}\n{"c":"d"}' | jlc -o a,b,ff0000 -o c,d,\#00FF00tail -f /var/log/my-service.log | jlc -n -ckubectl logs -n my-namespace --follow my-pod | jlcLicense
The scripts and documentation in this project are released under the MIT License.