3 ms·
Just output JSON! Most log systems will happily consume JSON, and you can easily run it through `jq -r` if you want to read it in your terminal/vi/emacs or use
by remram 5y ago
Just output JSON! Most log systems will happily consume JSON, and you can easily run it through `jq -r` if you want to read it in your terminal/vi/emacs or use grep.
$ ./myapp &>myapp.log
# Get error messages mentioning "foobar"
$ jq -c 'select(.severity=="error")' | grep "foobar" | jq -r '.message'