{"_id":"bunyan-format","_rev":"2956371","name":"bunyan-format","description":"Writable stream that formats bunyan records that are piped into it.","dist-tags":{"latest":"0.2.1"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"time":{"modified":"2023-04-27T07:37:55.000Z","created":"2013-10-23T22:29:30.935Z","0.2.1":"2015-01-19T23:23:45.971Z","0.2.0":"2015-01-19T23:20:51.489Z","0.1.1":"2013-10-23T23:58:42.384Z","0.1.0":"2013-10-23T22:29:30.935Z"},"users":{},"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"repository":{"type":"git","url":"git://github.com/thlorenz/bunyan-format.git"},"versions":{"0.2.1":{"name":"bunyan-format","version":"0.2.1","description":"Writable stream that formats bunyan records that are piped into it.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/bunyan-format.git"},"homepage":"https://github.com/thlorenz/bunyan-format","dependencies":{"ansistyles":"~0.1.1","ansicolors":"~0.2.1","xtend":"~2.1.1"},"devDependencies":{"tap":"~0.4.3","bunyan":"~0.22.0"},"keywords":["bunyan","stream","log","logger","format","pretty","color","style"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/bunyan-format/blob/master/LICENSE"},"engine":{"node":">=0.10"},"gitHead":"da4ea06a283e650acfc7a595ce65c5095ab3e4d1","bugs":{"url":"https://github.com/thlorenz/bunyan-format/issues"},"_id":"bunyan-format@0.2.1","_shasum":"a4b3b0d80070a865279417269e3f00ff02fbcb47","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"dist":{"shasum":"a4b3b0d80070a865279417269e3f00ff02fbcb47","size":6574,"noattachment":false,"key":"/bunyan-format/-/bunyan-format-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bunyan-format/download/bunyan-format-0.2.1.tgz"},"directories":{},"publish_time":1421709825971,"_hasShrinkwrap":false,"_cnpm_publish_time":1421709825971,"_cnpmcore_publish_time":"2021-12-14T17:08:06.330Z"},"0.2.0":{"name":"bunyan-format","version":"0.2.0","description":"Writable stream that formats bunyan records that are piped into it.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/bunyan-format.git"},"homepage":"https://github.com/thlorenz/bunyan-format","dependencies":{"ansistyles":"~0.1.1","ansicolors":"~0.2.1","xtend":"~2.1.1"},"devDependencies":{"tap":"~0.4.3","bunyan":"~0.22.0"},"keywords":["bunyan","stream","log","logger","format","pretty","color","style"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/bunyan-format/blob/master/LICENSE"},"engine":{"node":">=0.10"},"gitHead":"602d5c01346976e128c69264256fd630b605b8b0","bugs":{"url":"https://github.com/thlorenz/bunyan-format/issues"},"_id":"bunyan-format@0.2.0","_shasum":"cdd328b2659cc4df1491d6e05d6b9da7173e041f","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"dist":{"shasum":"cdd328b2659cc4df1491d6e05d6b9da7173e041f","size":6572,"noattachment":false,"key":"/bunyan-format/-/bunyan-format-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bunyan-format/download/bunyan-format-0.2.0.tgz"},"directories":{},"publish_time":1421709651489,"_hasShrinkwrap":false,"_cnpm_publish_time":1421709651489,"_cnpmcore_publish_time":"2021-12-14T17:08:06.555Z"},"0.1.1":{"name":"bunyan-format","version":"0.1.1","description":"Writable stream that formats bunyan records that are piped into it.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/bunyan-format.git"},"homepage":"https://github.com/thlorenz/bunyan-format","dependencies":{"ansistyles":"~0.1.1","ansicolors":"~0.2.1","xtend":"~2.1.1"},"devDependencies":{"tap":"~0.4.3","bunyan":"~0.22.0"},"keywords":["bunyan","stream","log","logger","format","pretty","color","style"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/bunyan-format/blob/master/LICENSE"},"engine":{"node":">=0.10"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/bunyan-format/issues"},"_id":"bunyan-format@0.1.1","dist":{"shasum":"4feff57d1e6388b3d946162204cba790c36fc8f9","size":6131,"noattachment":false,"key":"/bunyan-format/-/bunyan-format-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bunyan-format/download/bunyan-format-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1382572722384,"_hasShrinkwrap":false,"_cnpm_publish_time":1382572722384,"_cnpmcore_publish_time":"2021-12-14T17:08:06.852Z"},"0.1.0":{"name":"bunyan-format","version":"0.1.0","description":"Writable stream that formats bunyan records that are piped into it.","main":"index.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/bunyan-format.git"},"homepage":"https://github.com/thlorenz/bunyan-format","dependencies":{"ansistyles":"~0.1.1","ansicolors":"~0.2.1","xtend":"~2.1.1"},"devDependencies":{"tap":"~0.4.3","bunyan":"~0.22.0"},"keywords":[],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/bunyan-format/blob/master/LICENSE"},"engine":{"node":">=0.10"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/bunyan-format/issues"},"_id":"bunyan-format@0.1.0","dist":{"shasum":"f8709e9a97374785637997b35b01fbac75ded307","size":6102,"noattachment":false,"key":"/bunyan-format/-/bunyan-format-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bunyan-format/download/bunyan-format-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1382567370935,"_hasShrinkwrap":false,"_cnpm_publish_time":1382567370935,"_cnpmcore_publish_time":"2021-12-14T17:08:07.125Z"}},"readme":"# bunyan-format [![build status](https://secure.travis-ci.org/thlorenz/bunyan-format.png)](http://travis-ci.org/thlorenz/bunyan-format)\n\nWritable stream that formats bunyan records that are piped into it\n\n```js\nvar bunyan = require('bunyan')\n  , bformat = require('bunyan-format')  \n  , formatOut = bformat({ outputMode: 'short' })\n  ;\n\nvar log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } );\n\nlog.info('starting up');\nlog.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } });\nlog.warn('getting a bit hot', { temperature: 120 });\nlog.error('OOOOHHH it burns!', new Error('temperature: 200'));\nlog.fatal('I died! Do you know what that means???');\n```\n\n* Printing the level in String representation for Json objects\n\n```js\nvar bunyan = require('bunyan')\n  , bformat = require('../')\n  , formatOut = bformat({ outputMode: 'bunyan', levelInString: true })\n  ;\n```\n\nThe output would use the string levels:\n\n```\n$ node example/json-string-level.js \n{\"name\":\"app\",\"hostname\":\"ubuntu\",\"pid\":28081,\"level\":\"INFO\",\"msg\":\"starting up\",\"time\":\"2014-12-01T19:41:29.136Z\",\"v\":0}\n{\"name\":\"app\",\"hostname\":\"ubuntu\",\"pid\":28081,\"level\":\"DEBUG\",\"msg\":\"things are heating up { temperature: 80,\\n  status: { started: 'yes', overheated: 'no' } }\",\"time\":\"2014-12-01T19:41:29.142Z\",\"v\":0}\n{\"name\":\"app\",\"hostname\":\"ubuntu\",\"pid\":28081,\"level\":\"WARN\",\"msg\":\"getting a bit hot { temperature: 120 }\",\"time\":\"2014-12-01T19:41:29.143Z\",\"v\":0}\n{\"name\":\"app\",\"hostname\":\"ubuntu\",\"pid\":28081,\"level\":\"ERROR\",\"msg\":\"OOOOHHH it burns! [Error: temperature: 200]\",\"time\":\"2014-12-01T19:41:29.144Z\",\"v\":0}\n{\"name\":\"app\",\"hostname\":\"ubuntu\",\"pid\":28081,\"level\":\"FATAL\",\"msg\":\"I died! Do you know what that means???\",\"time\":\"2014-12-01T19:41:29.144Z\",\"v\":0}\n```\n\n![demo](https://github.com/thlorenz/bunyan-format/raw/master/assets/bunyan-format-demo.gif)\n\n## Installation\n\n    npm install bunyan-format\n\n## API\n\n```\n/**\n * Creates a writable stream that formats bunyan records written to it.\n * \n * @name BunyanFormatWritable\n * @function\n * @param opts {Options} passed to bunyan format function\n *  - outputMode: short|long|simple|json|bunyan\n *  - color (true): toggles colors in output\n *  - colorFromLevel: allows overriding log level colors\n * @param out {Stream} (process.stdout) writable stream to write \n * @return {WritableStream} that you can pipe bunyan output into\n */\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/thlorenz/bunyan-format","bugs":{"url":"https://github.com/thlorenz/bunyan-format/issues"},"license":{"type":"MIT","url":"https://github.com/thlorenz/bunyan-format/blob/master/LICENSE"}}