For usage with lnav
allowing for consolidated/colored logs with FTL
curl \
--silent \
--output $XDG_CONFIG_HOME/lnav/formats/installed/ftl_json.json \
"https://gist.githubusercontent.com/lamchau/bb12fc5265c77e275905b382ae3e425d/raw/d9288304a80b50ca0f65cbbeeec5cc060401b01a/ftl_json.json"`
tl;dr - Assumes ftl-.*.log.json
as the file-pattern (e.g. ftl-foo.log.json
)
Why? lnav
can parse JSON files natively but because it'd be challenging to figure out across
multiple JSON structs so we give it a filename to help it identify the format.
ftl dev . \
--log-level=debug \
--log-json 2>&1 |
tee -a "logs/ftl-$(date +'%F').log.json"
ftl serve \
--log-level=debug \
--log-json 2>&1 |
tee -a "logs/ftl-$(date +'%F').log.json"