npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

debug-to-json

2.0.0

@yoshuawuyts

npmHomeRepoSnykSocket
Downloads:12
$ npm install debug-to-json
DailyWeeklyMonthlyYearly

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

  • Yoshua Wuyts
  • Hugh Kennedy

License

MIT