1.0.4 • Published 5 years ago
format-loggly v1.0.4
Introduction
format-loggly is a lightweight tool to format loggly logs into human-readable logs.
Loggly logs are pretty ugly.
[user@centos log]$ tail app.log
{"level":"info","message":"getLogger: NODE_ENV=[undefined]","timestamp":"2015-06-22T11:15:54.535Z"}
{"level":"info","message":"relaunchEverytimeMarketOpens: entering","timestamp":"2015-06-22T11:15:54.575Z"}
{"level":"info","message":"launch: entering","timestamp":"2015-06-22T11:15:54.582Z"}
However with format-loggly, loggly logs become human-readable.
[user@centos log]$ tail app.log | format-loggly
15-06-22 20:15:54.535 [info ] getLogger: NODE_ENV=[undefined]
15-06-22 20:15:54.575 [info ] relaunchEverytimeMarketOpens: entering
15-06-22 20:15:54.582 [info ] launch: entering
Install and Run
npm install -g format-loggly
tail app.log | format-loggly
Usage and Options
tail app.log | format-loggly --noColor # Do no colorize log level
tail app.log | format-loggly --level info # Show logs whose level are higher than "info"