{"_id":"abstract-logging","_rev":"435367","name":"abstract-logging","description":"A noop logger that conforms to the Log4j interface for modules to stub out internal logging","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"jsumners","email":"james.sumners@gmail.com"}],"time":{"modified":"2021-08-05T06:10:55.000Z","created":"2016-10-20T14:51:03.931Z","2.0.1":"2020-10-17T12:15:48.198Z","2.0.0":"2019-11-13T23:51:10.640Z","1.0.0":"2016-10-20T14:51:03.931Z"},"users":{"seangenabe":true},"author":{"name":"James Sumners","email":"james.sumners@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/jsumners/abstract-logging.git"},"versions":{"2.0.1":{"name":"abstract-logging","version":"2.0.1","description":"A noop logger that conforms to the Log4j interface for modules to stub out internal logging","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/jsumners/abstract-logging.git"},"keywords":["log","logging","logger","pino"],"author":{"name":"James Sumners","email":"james.sumners@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jsumners/abstract-logging/issues"},"homepage":"https://github.com/jsumners/abstract-logging#readme","gitHead":"80dfaef91ee87008f4ed2b6e78921d383bccd406","_id":"abstract-logging@2.0.1","_nodeVersion":"10.22.0","_npmVersion":"6.14.6","dist":{"shasum":"6b0c371df212db7129b57d2e7fcf282b8bf1c839","size":1223,"noattachment":false,"key":"/abstract-logging/-/abstract-logging-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/abstract-logging/download/abstract-logging-2.0.1.tgz"},"maintainers":[{"name":"jsumners","email":"james.sumners@gmail.com"}],"_npmUser":{"name":"jsumners","email":"james.sumners@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/abstract-logging_2.0.1_1602936948039_0.5296186965288434"},"_hasShrinkwrap":false,"publish_time":1602936948198,"_cnpm_publish_time":1602936948198},"2.0.0":{"name":"abstract-logging","version":"2.0.0","description":"A noop logger that conforms to the Log4j interface for modules to stub out internal logging","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/jsumners/abstract-logging.git"},"keywords":["log","logging","logger","pino"],"author":{"name":"James Sumners","email":"james.sumners@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jsumners/abstract-logging/issues"},"homepage":"https://github.com/jsumners/abstract-logging#readme","gitHead":"a8c0a0a4540d49fd59c71d992c86d98271d7a753","_id":"abstract-logging@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"jsumners","email":"james.sumners@gmail.com"},"dist":{"shasum":"08a85814946c98ef06f4256ad470aba1886d4490","size":1083,"noattachment":false,"key":"/abstract-logging/-/abstract-logging-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/abstract-logging/download/abstract-logging-2.0.0.tgz"},"maintainers":[{"name":"jsumners","email":"james.sumners@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/abstract-logging_2.0.0_1573689070544_0.9593485003396589"},"_hasShrinkwrap":false,"publish_time":1573689070640,"_cnpm_publish_time":1573689070640},"1.0.0":{"name":"abstract-logging","version":"1.0.0","description":"A noop logger that conforms to the Log4j interface for modules to stub out internal logging","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/jsumners/abstract-logging.git"},"keywords":["log","logging","logger","pino"],"author":{"name":"James Sumners","email":"james.sumners@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/jsumners/abstract-logging/issues"},"homepage":"https://github.com/jsumners/abstract-logging#readme","gitHead":"114d7a55adf23c992ec57c24f515c825fd0bcd57","_id":"abstract-logging@1.0.0","_shasum":"8b7deafd310559bc28f77724dd1bb30177278c1b","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jsumners","email":"james.sumners@gmail.com"},"dist":{"shasum":"8b7deafd310559bc28f77724dd1bb30177278c1b","size":936,"noattachment":false,"key":"/abstract-logging/-/abstract-logging-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/abstract-logging/download/abstract-logging-1.0.0.tgz"},"maintainers":[{"name":"jsumners","email":"james.sumners@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/abstract-logging-1.0.0.tgz_1476975062311_0.956530021969229"},"directories":{},"publish_time":1476975063931,"_cnpm_publish_time":1476975063931,"_hasShrinkwrap":false}},"readme":"# abstract-logging\n\nThis module provides an interface for modules to include so that they can\nsupport logging via an external logger that conforms to the standard Log4j\ninterface. One such logger is [Pino](https://npm.im/pino). This module\nis intended for modules that are meant to be used by other modules.\n\nExample:\n\n```js\n'use strict'\n\nfunction AwesomeLibrary (options) {\n  this.log = (options.logger) ? options.logger : require('abstract-logging')\n}\n\nAwesomeLibrary.prototype.coolMethod = function () {\n  this.log.trace('AwesomeLibrary.coolMethod was invoked')\n  return {}\n}\n\nmodule.exports = AwesomeLibrary\n```\n\n## Interface\n\nAvailable methods:\n\n+ `fatal`\n+ `error`\n+ `warn`\n+ `info`\n+ `debug`\n+ `trace`\n\nAll methods are no operation functions.\n\nSome loggers, like [Pino](https://getpino.io/), implement a `child()` method. This method can be easily added to an `abstract-logging` instance when stubbing out such loggers:\n\n```js\nconst logger = require('abstract-logging')\nlogger.child = () => logger\n```\n\n## License\n\n[MIT License](http://jsumners.mit-license.org/)\n","_attachments":{},"homepage":"https://github.com/jsumners/abstract-logging#readme","bugs":{"url":"https://github.com/jsumners/abstract-logging/issues"},"license":"MIT"}