debug-to-json
December 7, 2014 ยท View on GitHub
Convert debug logs to JSON.
Installation
npm install debug-to-json
Usage
$ node ./app.js | dtj
{"time":"2014-05-18T23:47:06.545Z","hostname":"tweedy","pid":27374,"level":"debug","name":"mymodule","message":"Starting mymodule#derp()"}
Why?
debug is a great module, but isn't particularly tied
to any logging. So in order to make debug output more parseable we turn it
into JSON first, which in turn can be streamed to your logging location of
choice. Unix all the way down.