debug-to-json

2.0.0 • Public • Published

debug-to-json

NPM version build status Test coverage Downloads

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.

See also

  • bole - tiny JSON logger
  • bistre - pretty bole logs

Contributors

License

MIT

Package Sidebar

Install

npm i debug-to-json

Weekly Downloads

9

Version

2.0.0

License

MIT

Unpacked Size

4.85 kB

Total Files

5

Last publish

Collaborators

  • yoshuawuyts