{"_id":"base-logger","_rev":"230950","name":"base-logger","description":"Add a verbalize logger to your base application.","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T15:46:04.000Z","created":"2016-02-29T15:45:46.692Z","0.1.2":"2016-03-06T23:38:54.938Z","0.1.1":"2016-03-06T22:18:43.613Z","0.1.0":"2016-02-29T15:45:46.692Z"},"users":{},"author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/node-base/base-logger.git"},"versions":{"0.1.2":{"name":"base-logger","description":"Add a verbalize logger to your base application.","version":"0.1.2","homepage":"https://github.com/node-base/base-logger","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/node-base/base-logger.git"},"bugs":{"url":"https://github.com/node-base/base-logger/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=5.0"},"scripts":{"test":"mocha"},"devDependencies":{"base":"^0.7.9","base-option":"^0.6.2","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","mocha":"*","should":"*"},"keywords":[],"dependencies":{"define-property":"^0.2.5","extend-shallow":"^2.0.1","lazy-cache":"^1.0.3","verbalize":"^0.2.0"},"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["base","base-option","log-events","verbalize"]},"reflinks":["base","base-option","base-logger","log-events","verbalize","verb"]},"gitHead":"d0df0ffd3a0351707c185930708b448d8ba71192","_id":"base-logger@0.1.2","_shasum":"fd7148b1930ab686c2bb6d6d1b52b8f0d12b9d19","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"fd7148b1930ab686c2bb6d6d1b52b8f0d12b9d19","size":4015,"noattachment":false,"key":"/base-logger/-/base-logger-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-logger/download/base-logger-0.1.2.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/base-logger-0.1.2.tgz_1457307531504_0.9143149410374463"},"directories":{},"publish_time":1457307534938,"_cnpm_publish_time":1457307534938,"_hasShrinkwrap":false},"0.1.1":{"name":"base-logger","description":"Add a verbalize logger to your base application.","version":"0.1.1","homepage":"https://github.com/node-base/base-logger","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/node-base/base-logger.git"},"bugs":{"url":"https://github.com/node-base/base-logger/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=5.0"},"scripts":{"test":"mocha"},"devDependencies":{"base":"^0.7.9","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","mocha":"*","should":"*"},"keywords":[],"dependencies":{"define-property":"^0.2.5","extend-shallow":"^2.0.1","lazy-cache":"^1.0.3","verbalize":"^0.2.0"},"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["log-events","verbalize"]}},"gitHead":"fe7ce859f8c4b8d3dceb212bd30aa6e10cd31954","_id":"base-logger@0.1.1","_shasum":"7e7ae2a064baa8d761e976c40b80285fbab7abaf","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"7e7ae2a064baa8d761e976c40b80285fbab7abaf","size":3698,"noattachment":false,"key":"/base-logger/-/base-logger-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-logger/download/base-logger-0.1.1.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/base-logger-0.1.1.tgz_1457302720547_0.18415165529586375"},"directories":{},"publish_time":1457302723613,"_cnpm_publish_time":1457302723613,"_hasShrinkwrap":false},"0.1.0":{"name":"base-logger","description":"Add a verbalize logger to your base application.","version":"0.1.0","homepage":"https://github.com/node-base/base-logger","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/node-base/base-logger.git"},"bugs":{"url":"https://github.com/node-base/base-logger/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"base":"^0.7.9","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","mocha":"*","should":"*"},"keywords":[],"dependencies":{"define-property":"^0.2.5","extend-shallow":"^2.0.1","lazy-cache":"^1.0.3","verbalize":"github:jonschlinkert/verbalize#event-logger"},"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["log-events","verbalize"]}},"gitHead":"86c987c09a8a716d63f5e15f2a7b03689ed19d40","_id":"base-logger@0.1.0","_shasum":"64a5c9b8620b219a33557f5c152eb6a0f58a3f7f","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"64a5c9b8620b219a33557f5c152eb6a0f58a3f7f","size":3775,"noattachment":false,"key":"/base-logger/-/base-logger-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-logger/download/base-logger-0.1.0.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/base-logger-0.1.0.tgz_1456760743562_0.9717835988849401"},"directories":{},"publish_time":1456760746692,"_cnpm_publish_time":1456760746692,"_hasShrinkwrap":false}},"readme":"# base-logger [![NPM version](https://img.shields.io/npm/v/base-logger.svg)](https://www.npmjs.com/package/base-logger) [![Build Status](https://img.shields.io/travis/node-base/base-logger.svg)](https://travis-ci.org/node-base/base-logger)\n\n> Add a verbalize logger to your base application.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install base-logger --save\n```\n\n## Usage\n\nAdd `base-logger` to an app.\n\n> App inherited from [base](https://github.com/node-base/base) an uses [base-option](https://github.com/node-base/base-option)\n\n```js\nvar App = require('my-app');\nvar logger = require('base-logger');\n```\n\n> create a new `app` instance setting the `logger` option to `true`\n\n```js\nvar app = new App();\napp.option('logger', true);\n```\n\n> add the [base-logger](https://github.com/node-base/base-logger) plugin.\n\n```js\napp.use(logger());\n```\n\n`.logger` is now an instance of [verbalize](https://github.com/jonschlinkert/verbalize) on `app`.\nAll built in emitter, style, and mode methods are also exposed on\n`app` directly.\n\n```js\n// always log this info message\napp.info('this is an information message');\n// only log this message when app.options.verbose is true\napp.verbose.info('this is a verbose information message');\n// only log this message when app.options.verbose is false\napp.not.verbose.info('this is a not.verbose information message');\n```\n\nAdd new logger methods through the `.logger`\n\n```js\napp.logger.emitter('status');\napp.status('status message');\n//=> \"status message\"\n```\n\nLogger methods may pass in a modifier function to stylize the output.\n\n```js\napp.logger.emitter('status', function() {\n  return this.yellow(...arguments);\n});\napp.status('status message');\n//=> \"status message\" <= will be yellow in the console\n```\n\n## API\n\n### [logger](index.js#L33)\n\nAdd [verbalize](https://github.com/jonschlinkert/verbalize) instance to app as `.logger`. Adds logger and mode methods to the `app` directly for easy logging. Sets up a default listener to handle log events and write messages to `process.stdout`\n\nPass `options.defaultListener = false` to disable the default listener.\n\n**Params**\n\n* `options` **{Objects}**: Options used when creating the logger.\n* `returns` **{Function}**: plugin function to pass to `app.use`\n\n**Example**\n\n```js\nvar options {\n  defaultListener: true\n};\n\napp.use(logger(options));\napp.verbose.info('info message');\n```\n\n## Related projects\n\n* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://www.npmjs.com/package/base) | [homepage](https://github.com/node-base/base)\n* [base-option](https://www.npmjs.com/package/base-option): Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme… [more](https://www.npmjs.com/package/base-option) | [homepage](https://github.com/node-base/base-option)\n* [log-events](https://www.npmjs.com/package/log-events): Create custom, chainable logging methods that emit log events when called. | [homepage](https://github.com/doowb/log-events)\n* [verbalize](https://www.npmjs.com/package/verbalize): A pluggable logging utility with built-in colors, styles, and modes. | [homepage](https://github.com/jonschlinkert/verbalize)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/doowb/base-logger/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Brian Woodward**\n\n* [github/doowb](https://github.com/doowb)\n* [twitter/doowb](http://twitter.com/doowb)\n\n## License\n\nCopyright © 2016 [Brian Woodward](https://github.com/doowb)\nReleased under the [MIT license](https://github.com/node-base/base-logger/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on March 06, 2016._","_attachments":{},"homepage":"https://github.com/node-base/base-logger","bugs":{"url":"https://github.com/node-base/base-logger/issues"},"license":"MIT"}