{"_id":"log2amqp","_rev":"36-5ace333f6d59a557539f9a6aee71e84d","name":"log2amqp","description":"Log json data to amqp.","dist-tags":{"latest":"3.0.3","next":"1.1.2-1","unique":"2.0.0-unique.5","meta":"3.0.0-meta.1","videos":"3.0.2-videos.1"},"versions":{"1.0.0":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"1.0.0","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":"6.x","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"gitHead":"108722e2fa9c5be195a5ee8c5c554d0378a13d08","_id":"log2amqp@1.0.0","_shasum":"3f61bdfe2945fd1d360b0241712e4bf87c7dfe16","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"shasum":"3f61bdfe2945fd1d360b0241712e4bf87c7dfe16","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-1.0.0.tgz","integrity":"sha512-Psh4NiP/CTVh2QeMaqzVUliVGQYhdXLYel50nkX0ZFiIWyQSg6oGRN2s0X/tzvcfYq2V4r1cpqNVFYuQ2U7+yw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2CnMPY+0tIe1KpC9DQNqGNJss3yzmH4P7j01W/XzsrgIhAPlc2umkd8qvlDTt0rWiSHo50gTZl6BrbE51MiJJI9zK"}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/log2amqp-1.0.0.tgz_1494805992790_0.364108047215268"},"directories":{}},"1.1.0":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"1.1.0","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=0.4.0 <8","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"gitHead":"d238863aabca45e91c67b1ed56fd27084b447aca","_id":"log2amqp@1.1.0","_shasum":"e8b4fa2c5113e33c9994b6a6a49318d1a67a711f","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.4.7","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"shasum":"e8b4fa2c5113e33c9994b6a6a49318d1a67a711f","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-1.1.0.tgz","integrity":"sha512-q65c7z73ikj3vT0wo+agNgiPZuymg/3wcHEHDxc17IhZapUrLFPH5uI1Kb7Vv1rO114Msm+HBSn+xStNbfclLg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeuCcntYans20ZvuuIYb0PpRr6nkgAtDMKNaBT2F68pgIgWAAArQD58U0v8Sr+Nr3MkLAXK4t71buYstePxcRfen0="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/log2amqp-1.1.0.tgz_1494809804512_0.7037964505143464"},"directories":{}},"1.1.1":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"1.1.1","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=4.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"gitHead":"3f8fbbb4e62cf001ef9ea70958bf5a065295aebf","_id":"log2amqp@1.1.1","_shasum":"439aa467a219fcd0d03de5823c6745f873cde766","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.5.0","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"shasum":"439aa467a219fcd0d03de5823c6745f873cde766","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-1.1.1.tgz","integrity":"sha512-1jCzKap2fag21lv9UxF+s3NQzM0JzbxwxP4/Csqd0cmVDouFU6gNp/1ZbWQ+UGekZJEZFLml7R9szqM0chaAUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB7rRlWCAJOYOaQN1i4SAOY2HE3iV5U9h6nkhqPUGN/kAiAz/jIzWyzMrybtCUCmjS4ffvapUwR7wW2E7ZwhGObeNw=="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp-1.1.1.tgz_1496117492145_0.04508649604395032"},"directories":{}},"1.1.2-1":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"1.1.2-1","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=4.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"gitHead":"a15d07f2b6fa31bffe264ee669aea28354a5085c","_id":"log2amqp@1.1.2-1","_npmVersion":"5.3.0","_nodeVersion":"8.1.1","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-H7/jJ2qMF3/Bt+MPQwFqS1XYf/UtsAXIIAXoIt/Vo3j8PVr1v9Hi2aE5xgFrp9PMN1heZ7P/awhmzNs1u64+8w==","shasum":"b571a1a6b31cc3d1ec4b5fd8dfb9eaac6e7e24e6","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-1.1.2-1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGpLbvWdL//GmHEvSQDCo3oOKN1ni3JBn/Zertv9KlTWAiAZk7dJLMu9x9QfWMo1aHbXouviOQg4l0oIIl4RJLsCzQ=="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp-1.1.2-1.tgz_1503530511220_0.28195078461430967"},"directories":{}},"1.1.2":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"1.1.2","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=4.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"gitHead":"009175bfdfc807a844c2ecaca71ce4782ef2459f","_id":"log2amqp@1.1.2","_npmVersion":"5.3.0","_nodeVersion":"8.1.1","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-VUPePXzybVMkJohYSBSlrl0nkDpojWyrB+NPqqCxnh+6WOcXD67XNv8M/nSUATHW4XPbuvjBrrcu7+4Kj7ydjA==","shasum":"59e43a73cc8aa00cfbe4ab4ba7baacaa0098d8a7","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-1.1.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcrE3UNCsLNLT6kV1db9dVe+4w8IzUm90Q8xChZl0vhAIhALEUN1XymA6eYha4n9XbpKlhLvTUrxcGFjIXdP6CE+jj"}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp-1.1.2.tgz_1503536815857_0.2933808204252273"},"directories":{}},"2.0.0-unique.0":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"2.0.0-unique.0","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=4.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","uuid":"^3.2.1"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log json data to amqp.\n\n## Purpose\n\nUse this for data dumps to amqp.\n\n## Usage\n\n```js\nconst config = { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo' };\nconst Logger = require('log2amqp')(config);\nlet logger = Logger();\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush().then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey\n});\n```\n\n## API\n<a name=\"main\"></a>\n\n## main(config)\nCalling this with given config returns a function getLogger().\nWhen called, getLogger will return an object:\n{log, flush}\nCall log to append logs.\nCall flush to manually flush (you must do this.)\n\nconfig\n\nurl - the url of the rabbitmq server\nexchange - the exchange that will be asserted and used to publish to\nroutingKey - the RK to publish logs to\n\n**Kind**: global function\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n","readmeFilename":"README.md","gitHead":"c70fc2d54aab87665c57161784b885abe2a58de3","_id":"log2amqp@2.0.0-unique.0","_npmVersion":"5.7.1","_nodeVersion":"8.9.4","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-8zS+sHWobWxov7LxclSG6MF7sa7H+4u1uX0ezjbLCb5+GFwhdLry7/vrZuwyapRESpF9NfBk3DD2d3mL1VVVEA==","shasum":"348fd82fc365f50afa507d45d715a2d8c1ffad4b","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-2.0.0-unique.0.tgz","fileCount":7,"unpackedSize":10173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3V7xCRA9TVsSAnZWagAAAtAP/jFY4P5uXwhcrqjssd0W\nzw5WlGOog5+5HaG7y5myzV55jLrl/IG6WkRRgzbPAP/3mG2lNpjh8hgwqGGs\nTTdRRKpEOtrvd3KW2yY66AdT7qVgBW208P3hFdcRJQcAu917KHxZxPwAZGfe\nD0HDT7F1gPKFqXuDMx4He4sFqaNdnF15Exj9tHOirMvwtDoK8zUm9+yItFnv\nkL+RDCVJpur3lUWBEYAJFSBpF3NlvTtnaQDLNqB9+gIVHUF6F81j93hLVQQO\n9R2RAXtFfH22ntAYL+VEljreEQsEUn2IvsmlPZzb9NfEAum2zjXf38RoDuGs\n8ZraZvacJiiEn3FeF+906Y7/ZDNH0h14qnbzhzimaDTpRMowJ/CqAloxtgP0\nhGmykItYqTmjWEwK5sTbjnPLSF29oHblT4kthNJhFkheJFZnrvxYV3CKh1fB\nz3KzoxS9lHkSr50keYXr7pWS9YB8eSONHZzVBScjuBZGC7u5iYqRf7B5aT7i\nuokPrvODIgduUtWyhRHt/70qSGofu86+kMePKzTDzPz4nBreUIWL5Jkj5979\nHTz8dAk1eHFNLYwg0MS1mVjat3LzNfj0HCI8tA7hs4N1c31tw7Kk18mZpZD+\nIWJD07tijBw9QTWjmxzY3dPxcZMjT47hJwZGeoA9bG0c/46ADqjPrpZCgUEK\numEx\r\n=TvkI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb1u+idJgAjS1e6IK7oTaxHhdwc8y4AXEimP/ijFzZswIgGy37zxJJkzPvhZbyEaVbs4Y56ake4mLECX17oMvUK9Y="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_2.0.0-unique.0_1524457200337_0.7047511032277796"},"_hasShrinkwrap":false},"2.0.0-unique.1":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"2.0.0-unique.1","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=4.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","uuid":"^3.2.1"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log json data to amqp.\n\n## Purpose\n\nUse this for data dumps to amqp.\n\n## Usage\n\n```js\nconst config = { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo' };\nconst Logger = require('log2amqp')(config);\nlet logger = Logger();\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush().then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey\n});\n```\n\n## API\n<a name=\"main\"></a>\n\n## main(config)\nCalling this with given config returns a function getLogger().\nWhen called, getLogger will return an object:\n{log, flush}\nCall log to append logs.\nCall flush to manually flush (you must do this.)\n\nconfig\n\nurl - the url of the rabbitmq server\nexchange - the exchange that will be asserted and used to publish to\nroutingKey - the RK to publish logs to\n\n**Kind**: global function\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n","readmeFilename":"README.md","gitHead":"4aa0e5936f081eced196a2849fcadf338907a612","_id":"log2amqp@2.0.0-unique.1","_npmVersion":"5.7.1","_nodeVersion":"8.9.4","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-j3AFfhZ0EO/UQa9YK9pyu4LCTH2P9lahaxIOo41IMbrN5zoJwoVS2luqJMIXXRptm6KBH2syRJbTPBtBkjErSA==","shasum":"ad67d71341a2d3e60e29a008fd16f2603d8b5f0c","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-2.0.0-unique.1.tgz","fileCount":7,"unpackedSize":10239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3WNTCRA9TVsSAnZWagAA7f8P/2Wpq2VLIUaXGrus6L4t\ngdbAfgBR1SUZcJfkBflbv/i7PVyCgEqJjj5C9GfyGvvONpmZb+oP6eBnjr09\nP68qtIZaNndZjHPa9hqg0klgrl0AaqewcO1fQ823lBWra3S8552ucsv+XCuA\nL1eGXRKkzfGt8XpYyuPFaegwadcw7itjrza1zVAIcWy7CuoA4BaMK4/2LQi1\ntaUryjKpF10S3K5gNtYbhBV1FmTgRlZmESRdkufAzzXbD6o1J3QJu/+e5d2z\nTRudkcTERWv0iPl1Tv3jPEUV8ka2h3Zjk6Do9voFVj0IOQc4tD1mzBnRT4W8\n9ontikCW2P+r6vs3psMg4gMb0bAi6IylsITY/YyP8bByGVfYTkq5iYU2ccec\nmA1XRz1E9lL182zz9kDhGA8J/CKN7hAYQdtB7dB/rVc4Tb8Alg8G7/E5uSGQ\nO1WZknhIwCVYyExX/csVScrr6mCuq30IvqLEGE08JsnvFuN4YCgKINbN4kVr\nWGBoVs99eOaxSzFZK31R2m7CuDJyGOJkCXNedzhIMlwaTYzKj000Vxl5iGkE\nxC6o402djOW/avFUWPSQ5nobCTEwxG8S9DeQCuVVskQXeu6UjDcse3DmVlTp\nzBncjCmYhXVrzQDdT+3A48oN27BO2+Tmzvq5UWBIfEGK6ZMy5ZiQPSAlwHbM\nf6Qp\r\n=Qqo0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsDy7z6EhBAYrPoFY+OxsU1V1dnYO5aosYSWNSl3LB0gIhAIchGeKxQaOUhOzLN0kNnBx2sLqnUFQc5wj7dVrUONuq"}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_2.0.0-unique.1_1524458323278_0.573231048082959"},"_hasShrinkwrap":false},"2.0.0-unique.2":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"2.0.0-unique.2","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=4.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","uuid":"^3.2.1"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log json data to amqp.\n\n## Purpose\n\nUse this for data dumps to amqp.\n\n## Usage\n\n```js\nconst config = { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo' };\nconst Logger = require('log2amqp')(config);\nlet logger = Logger();\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush().then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey\n});\n```\n\n## API\n<a name=\"main\"></a>\n\n## main(config)\nCalling this with given config returns a function getLogger().\nWhen called, getLogger will return an object:\n{log, flush}\nCall log to append logs.\nCall flush to manually flush (you must do this.)\n\nconfig\n\nurl - the url of the rabbitmq server\nexchange - the exchange that will be asserted and used to publish to\nroutingKey - the RK to publish logs to\n\n**Kind**: global function\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n","readmeFilename":"README.md","gitHead":"cc8962b91939df033545850d6957b25cc21aa1a0","_id":"log2amqp@2.0.0-unique.2","_npmVersion":"5.7.1","_nodeVersion":"8.9.4","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-k4tTYNlyrwRvvS/3OBopT1q/sapaXVpoTX/3fYq0zyL4lDV/4xAgUcXJtajxJ/BiQOcJip4HYFbnPeTVTfd+1g==","shasum":"f879048a1fcf615a90fef6071a7b01d0e76a60c6","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-2.0.0-unique.2.tgz","fileCount":7,"unpackedSize":10500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3o5RCRA9TVsSAnZWagAAkGYP/1mx5OAyqxNVEJP5xVsA\nH12NvoQP251DuD7pij7NlpMiZoysq0I3basn0/XFYBiEpuoNdz+yi7O0JFYc\nl7STkzzTUQ8ENZ6gKN9jQpi9MmIhejmrdLhePS/quk5/wtO7wk5DDmIx6jf5\nqapsGT8YW2an5llSKlgc0gddE2BvirWu8R+ISENnQt/zgk/ibVaTlzqagEt8\nv0oQWqmj6sgUdSpbiII+yfe3rNNLkwu4tl621AACc8eGOUwxc/DEQiapiO1i\nGTi2cy1puLlHabocoQEcv+RBwQMtXwEhswGTPadrTicAcDlcF79oQsPaiDmz\ng0eGMXM5kU/T+ZTwHDucvbhgrbzfyynEPiKWEG36QIDlZTsAYI1Ilk/4aPVy\n2rkE+7SjsBLoHJH4H1hPIb5dG2v/JjMq29NjW+mo/Ghlzn7DWNBcOj1vadvz\nhtzYxSQ2LWnO6l4D8mG94A2o/dn/6qZviGXFbySUoSe/ltOekUMWwCs3WUEm\nVwHcF8UU1oa3UsDjtxS1ygnMJX/xncVT8guZFDBHPAmDc38dTF1N6j9EGpo4\nII2LqUts49X8ymzdGGqSRfOsoBQbqhjpikiJwTKVxCKOuzPHSS/QqOVttpNg\nXNCo06YRAzvhTibs36DtBqCX+Dx1cxSS+zZfH22K1P3yU7CNTEogp1Nwdyri\n3kDG\r\n=Na7X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfChGQa5ZF5B6Znk7VchVfWMIuyQSDFc1hYyl7h9qOKQIhAMgPetZln/OA8ye0gtmKdtCe5RyGgWyd/CDsjU0FqiC2"}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_2.0.0-unique.2_1524534863656_0.7055558640459134"},"_hasShrinkwrap":false},"2.0.0-unique.3":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"2.0.0-unique.3","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=6.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","uuid":"^3.2.1"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log json data to amqp.\n\n## Purpose\n\nUse this for data dumps to amqp.\n\n## Usage\n\n```js\nconst config = { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo' };\nconst Logger = require('log2amqp')(config);\nlet logger = Logger();\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush().then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey\n});\n```\n\n## API\n<a name=\"main\"></a>\n\n## main(config)\nCalling this with given config returns a function getLogger().\nWhen called, getLogger will return an object:\n{log, flush}\nCall log to append logs.\nCall flush to manually flush (you must do this.)\n\nconfig\n\nurl - the url of the rabbitmq server\nexchange - the exchange that will be asserted and used to publish to\nroutingKey - the RK to publish logs to\n\n**Kind**: global function\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n","readmeFilename":"README.md","gitHead":"700a37654091f345f41a958acb64f5f4df6e5bc1","_id":"log2amqp@2.0.0-unique.3","_npmVersion":"5.7.1","_nodeVersion":"8.9.4","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-IajHYqu28WXlW2njrdTyT/ioWxgrkbt0BDxT/H+vf0jMzhaEeitunDSo4/kJGKu9VFV4D2MeobyFzFg6tbGvJg==","shasum":"26b1f3f88cf546a736e3ebbb1f4e73d2b97e7490","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-2.0.0-unique.3.tgz","fileCount":7,"unpackedSize":10492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3qdICRA9TVsSAnZWagAAZo8P+gKmTHwEQE0drY2UbkkL\njydHodJid+vFvSQiRhpkZV7wlgs1h4Wo8Au5hUaN/kURALlfsKvePt56bVsb\ncpsuhaG0pRmeVSsymYc6tShuruOhwi7ayI+dlcpqUnRvchYT1XkI44131/6K\n6efONV5GUv3JQbXmJSePSvgZtF31RR6fjA7FB1GVyJY4xdAlaeIm+BXsoTmq\niAIsM+P+5t7dOoLQyLIV1my3BfwqFNKBODbriIj2YXITQ99QxYuM0708p3Ls\nEk7asQgOKRp30JXsSOmS+yx4xpi+P7JePtDhPYRTLTUEV0dhQoQBYY8XSOvM\nqueBqHDXp6qlhb6n0inpA2iggBg5BX5ibO/Js7BHt80lew91UoFpH8ZqEDS/\nvtiJIm543Kkz68q/z5ZbOCAV32Zbc1EeLfFZd5H07VUCgw1m4inuKPVLIbyX\n7j0tzUlZcbH5NacdHbQbxgi6Njezfxb5XY5tYqxAtLlR7jEkNcJUnBZqJL0K\nuVUyYHNxsco5UKu+INPRju4wJKhOxd8+IFlGRt6GJqCAxqD0orvbYROm73VC\n3/UClawaGKqxtJcZ3hpIARaooG0SG7J5YyJhglIhifSuHo/neqPjwcIn5XKa\nGAYh0sSFYmV2tf5xpFJ0D3M0CZIUJhKA7E1xjDypvsDnKBM+OTX+H2acPZ9E\nzlrO\r\n=irB2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH18UTkuHzxM2ar0SsvK7AXj4QEsVuDOYjyKfzoepx67AiB2SoFnCuRRH1+0oY5H5A9EQkf9dA5sk+yFg+HrPQwcCg=="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_2.0.0-unique.3_1524541255951_0.3233584177729376"},"_hasShrinkwrap":false},"2.0.0-unique.4":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"2.0.0-unique.4","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=6.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","uuid":"^3.2.1"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log json data to amqp.\n\n## Purpose\n\nUse this for data dumps to amqp.\n\n## Usage\n\n```js\nconst config = {\n  source: 'my-source',\n  amqp: { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo' }\n};\nconst Logger = require('log2amqp')(config);\nlet logger = Logger();\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush().then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey\n});\n```\n\n## API\n<a name=\"main\"></a>\n\n## main(config)\nCalling this with given config returns a function getLogger().\nWhen called, getLogger will return an object:\n{log, flush}\nCall log to append logs.\nCall flush to manually flush (you must do this.)\n\nconfig\nsource - the source you are logging from\namqp.url - the url of the rabbitmq server\namqp.exchange - the exchange that will be asserted and used to publish to\namqp.routingKey - the RK to publish logs to\n\n**Kind**: global function\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n","readmeFilename":"README.md","gitHead":"5c21531062a9f800386d76d5a8df5534c9ac949f","_id":"log2amqp@2.0.0-unique.4","_npmVersion":"5.7.1","_nodeVersion":"8.9.4","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-+C+zeSLCCXD1c7nNLYWIxS16zs66i9FSDg6m6ESVV2xRUX7eyP4uDN6QXa+OOu+B1+4IsJQFf9i0jRDFnQnbRQ==","shasum":"9ba37d4a5bbda8b5b72a308ec0b776457ff531f2","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-2.0.0-unique.4.tgz","fileCount":7,"unpackedSize":10959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4oUMCRA9TVsSAnZWagAAHAAP/iYEysTth+1rhDI2HfS6\n/BZ981/VRYW50bJHQka5GeEzUL2EoHy/B4eoMLv6eJj0pUtjCaM3y5CvTLrX\nL1TBxF2IMVJEdogGhLv0DJDl/39zy2GOe1h/myfgsr2x9//hADGchWU5DyeV\ndwlQcCwonJjsW0ZPRTNZcaqGYv75gF4hfasMstqzsCK20MLB1N2TjQO0OfC+\nTppds8OaNaePqY8sYETJQpYKc+ycOU34rFM96RF3hjEQCwonOGKshpvn4R5e\nxiuZv3CgwDH2bLXJmC8LJo+S92Rg4iNPuVWBYrAMsAz7aPh5rM6Rb07eMYWf\naZnKOKGpmSwEJMqLqU2RgNPx4HcNwxhDvvSHRNAjftC/5kggGatVkGa7y+G4\non90kMWWTX+5+oaLjurW/yOCc3X6FfxoqnJW5axTYx1awZlv81RXOU3OHWlE\nkAoJGWOz/FiesvpxOlYBj4Oi6/EJCx63C8cCF3MeWPJ+SdtgJctwk8/dKYTt\nF970b4AzufMKeXZphFkp1GS1Wly96hSuG1EKPjYiMb5hV8C79w8VWKBhSVLq\nPfIrVQinJJFdqrAeuvPaW7TS/GLDukbW5ehKSXYzM/AM6/POJ0AZFUIoan4y\nyrW86ROWhHlQavIdm7hZYdWgS3bYGE+xbETcv01bD79ZDxXkp1DYYY6tAIbc\njNp7\r\n=w/lm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHKGvi46IM5OV6kBxeUdfWws7JHtlpGJxVVA+JkAXbHwIgdBENYiHgPKW7j+2y83CUhe4QD/bBPN1T6QGCdLkKWhI="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_2.0.0-unique.4_1524794635839_0.5173250620428467"},"_hasShrinkwrap":false},"2.0.0-unique.5":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"2.0.0-unique.5","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=6.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","uuid":"^3.2.1"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log json data to amqp.\n\n## Purpose\n\nUse this for data dumps to amqp.\n\n## Usage\n\n```js\nconst config = {\n  source: 'my-source',\n  amqp: { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo' }\n};\nconst Logger = require('log2amqp')(config);\nlet logger = Logger();\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush().then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey\n});\n```\n\n## API\n<a name=\"main\"></a>\n\n## main(config)\nCalling this with given config returns a function getLogger().\nWhen called, getLogger will return an object:\n{log, flush}\nCall log to append logs.\nCall flush to manually flush (you must do this.)\n\nconfig\nsource - the source you are logging from\namqp.url - the url of the rabbitmq server\namqp.exchange - the exchange that will be asserted and used to publish to\namqp.routingKey - the RK to publish logs to\n\n**Kind**: global function\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n","readmeFilename":"README.md","gitHead":"b6fa1437a767b28db92e34e106fd63107c83ae3c","_id":"log2amqp@2.0.0-unique.5","_npmVersion":"5.7.1","_nodeVersion":"8.9.4","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-R0WOn1i7897fPkwl+AF/VLmdU8XUdEQwYMV1GQumO1RTQNNXG4j8WeJfeGjBJg3TkXJaw/zq/mRa9QfziBg6hQ==","shasum":"716164ccb31b00ab93140d829c23f165fd2ad10f","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-2.0.0-unique.5.tgz","fileCount":7,"unpackedSize":10974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4pGoCRA9TVsSAnZWagAA7z8QAKLNkj7SRmrZ9YwmZzRx\nWkYRyNf4ifcEiC4qTGqYb5xSAgQUzoEA8fqOf+kgo3V3Zm4O8BJtqdGcbzfV\nMnlqaUWwLnUf0GCIjl+qsL2gGuvBv/5qQTl3kaWsllCaL8ktLxqY8sMPAHJP\n7GAe/dcBVHHgLRe9un+Kx8m51YGFUEQt5BdGKUtNGYjw82cgz2FvXi2GXmEQ\nFdF2Ha6g0TH22PxZBuR7Xb5bujVHM8Rvd4hwZkEGMWK89chUThtefjAvYDAU\nUBP1qo4gm/Cldzan1DW0qSl6QFt0UxQEsiMi+itk56919Mnn5Uin/W3Y4ifI\nbKtp2ZuU8c/tikmkWBpajuyQNmCn0acaxU+/mK0AQJZ/uvbHVSRNSBV96BCp\noZPD+AS1PWiDhtJxOc6JIlc88S9hobbIMr1HtQs007/VJv7eOEO8EfuCp13t\nqJ7bdDm3cy4WWvkexx1Cg5pMNTiGqVem2RFd1GMWWVUU236RGNdIFOxxunWK\ndesLHybH3DgOhxFKyA0np/WUwbpsrcHumIyE/eNcceD+hT5ymD986bhtY2hc\n1QnvOAUyZK5/llL596zxf5hMTU7Ov4+X1IUrnaczDHzJMoVZee3cIJ//xHMH\n4mYAXuAWC2jTIih0Q+i5Tc3iB9GA88Bvzs8ABgTHi2QDAOJukg7HxjQLfjsL\ng6zM\r\n=T6wR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFUWtL7dn1chNhlEYTdtt/wtXS7HDTQz3Wr0PgJn6zzoAiBbsglxiA0hY3mCbauaJapYyC+4gIaQKKyxC9kRPRNitg=="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_2.0.0-unique.5_1524797864012_0.38609149502662277"},"_hasShrinkwrap":false},"2.0.0":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"2.0.0","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=6.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","uuid":"^3.2.1"},"devDependencies":{"chai":"^3.5.0","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"~3.3.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^2.2.0"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"gitHead":"9c46ac97be23063443ce4ca68402090583a58ef5","_id":"log2amqp@2.0.0","_npmVersion":"5.7.1","_nodeVersion":"8.9.4","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-yJgksMCRAEUI7uWzhV/ilGl6xcKzHcVYsW5XxCxt1nzCVVUag+xW3X+ihSSHkZYdrijMj6VUUdIWAiozhxAZjw==","shasum":"ed630e11e1b5052ab9789312cf61f5929cd424b6","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-2.0.0.tgz","fileCount":7,"unpackedSize":10965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa5kYuCRA9TVsSAnZWagAAg5MP/iXkcHUBFrz+CcNSu8HE\nRQbDFqbolr00gvmS3d4WTZ5zApBEQSAbRfyzizW8rWEj+JNWrowjvFLt93/d\ndkyxPoe5Kh8pFMbvGcPxQALBtmVt1flCjp0rAWDRi5xq6YcQ5jQPdNc6v7oW\nRo9fa+XyMkGU6jOCrFktvMNqVO80Ob2o9YOelMRxoNhVhGvVSAJPmXj+riOS\ncvCl/54s7NdygQguILDWs5z5ozP695JB97Ebku/z2nk4cqNJbiBm+gSRTtCE\n75oEg28QPR/nao8QdH22MFlFQWB8vbEeBWdTp5b9yhenQbszid2CEk7BWFmP\nBHEyi48bt5i6Jg3lDP8va/sipkLDh34ILIJev2EZTbd4jDHnwUoMRNcmeTpp\nRuT76ceL80hbV/tnNlOwaJF2Ihi36bq98iYIwGGE50OBRCRRV/m1BQR401XO\ne+ISyg75t7w8rS1hiMHG9PlkRoSnpZp0PDXfDgA4aRwM0M687rNtRJbs/uAq\nRaf2GXeaMrAVFDVlcEA02LIK+Bvkrk9UjV9sR+Grern4w2JGmu62AXh+HDUd\njQ4lJyYv5eCMOXYskwudLu3I9/QXXfRGzeNwxzE05y3t/9SViRkpcmn85Vlt\n7joe4hp3yF7rYzjxWkTEOmVyXyTFz/zc2iY6IEBHu6nAVnI24i5U7dVbebbm\nX91B\r\n=fnKT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA1c0adkgo71s9s3T/FNpShTdvJej551MJCyZR41xI9jAiEA00QS63/uJ95byqvqryR/Msk8sT+Wr7mecbLDvhYOTuE="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_2.0.0_1525040684804_0.8625006322154489"},"_hasShrinkwrap":false},"2.1.0-meta.0":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"2.1.0-meta.0","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=8.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","uuid":"^3.2.1"},"devDependencies":{"chai":"^4.1.2","chai-as-promised":"^7.1.1","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"^5.2.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^6.1.4"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"semistandard":{"env":["mocha"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log json data to amqp.\n\n## Purpose\n\nUse this for data dumps to amqp.\n\n## Usage\n\n```js\nconst config = {\n  source: 'my-source',\n  amqp: { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo' }\n};\nconst loggerConfig = { meta: {/*...*/} };\nconst Logger = require('log2amqp')(config);\nlet logger = Logger(loggerConfig);\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush().then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey\n});\n```\n\n`logerConfig.meta` defines an object you want to apply to the whole logger\nsession. It will be included at the top level in the logged payload (same level\nas `logs`).\n\n## API\n<a name=\"main\"></a>\n\n## main(config)\nCalling this with given config returns a function getLogger().\nWhen called, getLogger will return an object:\n{log, flush}\nCall log to append logs.\nCall flush to manually flush (you must do this.)\n\nconfig\nsource - the source you are logging from\namqp.url - the url of the rabbitmq server\namqp.exchange - the exchange that will be asserted and used to publish to\namqp.routingKey - the RK to publish logs to\n\n**Kind**: global function\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","readmeFilename":"README.md","gitHead":"5ae8ff6499cba41bf6b1c21d7c7df4ec0b4caa0a","_id":"log2amqp@2.1.0-meta.0","_npmVersion":"6.3.0","_nodeVersion":"8.11.2","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-nLDRDOiLK3jQaX2pTEqUVH+h+vNuH9YBZ07SQBGMLN2XiekWf0hNsoH7JWR/0oiYmeg86rFfWws2CVI5lqY7Yw==","shasum":"9be62fdf08f9641e699f4ca444b31812e50dfafc","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-2.1.0-meta.0.tgz","fileCount":7,"unpackedSize":11827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY+PnCRA9TVsSAnZWagAAz/QP/2Krh81QUAXP2KLPpQNt\nMrC0xRiimShWvX/kKlA3OFBqkivW6S0VNdx3b/tcb3fsXF++CDyfaaCGoTVU\n4u2IzSuyt52tyVbqXl20pZ9yEi/3SJ7Nx90oqtAGa3gE9WfSx4i5lbdYT+KX\nL5sUwUmsdGWDxHKrZ9s8Aofe48ARlZC6VB1k0lvDn/pizVknRLz2GZfdoQQr\nfiJJhjhvzyYwiOJJBMWa7CNA8sm3N5D7X9k9SxGdLYcLmkPGDVL84GIRG+yc\nlzi/Zd2GDECD8ZV9m2rtg//uyVKiviwCgDYx0c/1XjBAu/Jsa3cOv3J7Bhy9\nzw4ytQBweMcpoif8X2nSob0JxBTgXvy4G3XvRvH23E1gRSmYu3wKs0nrRFPb\nXW+vcXmIrQzuYKuFWkzI64d8KO83p8m513fWqz8yqpyWL9edURmbClgi8XmF\n/3DK7Nb6a12gmtJQbERzdaawke6TWDXLd9Ackkj3WVdcepXmFGXh1hxLvOYI\n4tIOe/kUkI2YkGOS4bW2t20vS8QtSECcKE7L8pOsv/m6qZR99kEH9KUKizqK\n5iCzsSsW0GeIWEjXNn6XtrnC7wxzGVQBpKlgLxN83sHPccvfE3e4Kj42gKqz\n0bGV5qtCmzmENwoYRvHiV1lGxP8HKQOiuLgbBwYckvOOoO0HCisIKBwcAaZ9\nOOI2\r\n=90C1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6HDY6sCsolYwwg3nvf+iqKG3smY4GCwPcyUWN+EnJGQIhAMVZFswpzL52+jDRlut/gBNkJeztKPjR68GybowiS/i+"}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_2.1.0-meta.0_1533273062884_0.5610771390564884"},"_hasShrinkwrap":false},"2.1.0-meta.1":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"2.1.0-meta.1","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=8.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","uuid":"^3.2.1"},"devDependencies":{"chai":"^4.1.2","chai-as-promised":"^7.1.1","dirty-chai":"^1.2.2","jsdoc-to-markdown":"~3.0.0","mocha":"^5.2.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^6.1.4"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"semistandard":{"env":["mocha"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log json data to amqp.\n\n## Purpose\n\nUse this for data dumps to amqp.\n\n## Usage\n\n```js\nconst config = {\n  source: 'my-source',\n  amqp: { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo' }\n};\nconst Logger = require('log2amqp')(config);\nlet logger = Logger(loggerConfig);\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush({ meta: {/* ... */} }).then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey\n});\n```\n\n`meta` defines an object you want to apply to the whole logger\nsession. It will be included at the top level in the logged payload (same level\nas `logs`).\n\n## API\n<a name=\"main\"></a>\n\n## main(config)\nCalling this with given config returns a function getLogger().\nWhen called, getLogger will return an object:\n{log, flush}\nCall log to append logs.\nCall flush to manually flush (you must do this.)\n\nconfig\nsource - the source you are logging from\namqp.url - the url of the rabbitmq server\namqp.exchange - the exchange that will be asserted and used to publish to\namqp.routingKey - the RK to publish logs to\n\n**Kind**: global function\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","readmeFilename":"README.md","gitHead":"9f82a97aec112eb311fc94b23a59e075ce7ff5d5","_id":"log2amqp@2.1.0-meta.1","_npmVersion":"6.3.0","_nodeVersion":"8.11.2","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-36SDuYYTfp8AQoZY+LISAKyBYOPATJx0GmIhF/AeF1XBhVMsi50f2tFRXQP5KXZ5GeM/IZsNjkiLyngVBYtupQ==","shasum":"4d771f70ee63953b00f1236280f617234d063acd","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-2.1.0-meta.1.tgz","fileCount":7,"unpackedSize":11798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY+jPCRA9TVsSAnZWagAAPGcP/0q8MyApjZERux3Li9ZV\nH05jxlOrzlJlnBWWqbxiGZkpU6ySrKlRAoyKV7ArcQ+ckH+Y62X0LwEgFRkN\njDDLCNZhUEUgSlWNEBpYqvTNxlWRQ8cgYIfx3kh8vmtMNfRT0D5s7ss4BBno\n470QIDG8mRw720o0ghRNB1lLKjxp7epdSDfYsRA25/OBcRjXfq7MTuYHVC3C\ni2hWtDlpIKS5MA7aTSr8X69Qeivbb/pobQxBOkDgY5blM5GnN9qnAr5bZuwn\nyT8N7I9SE+i1zzSoQVwg9WO3GllCD/siTlSsAEqDpIpe5qXC5tfHIM4yqk5C\n7Mq/shmrwTokSRe/YYQE567BxK9IXDOA5mVm+BgZXTf9rHEn4o9rxeOW1ehp\nZT4kFwAvp9ZBXmJnezAu0m7Yd3y0O/bxwPyRTLTe6Kj7C0CJUd3XRB+pwkJz\nVCXSI4KZrUMhFmXzRM1HUkck+wRlFNosEkCpmQenic3SfgimkA7DWI1IQfv8\nNW1z3BU6q6kVkmtobp6Fvg/1vM33x82y295EqZEr8lLQLOO1PXUTI8uxMVn9\nuwsos5XYr5yI4IzixWqSgGqgqc2D80ncInbxVcVMY9HlNFuS+3PUb70eDIS5\n2TqSMSbdv2tPuyysyNXtrYe+fJ60eymoojiEfTrrssxjY2GEXONLYZW8BwWH\nvAzJ\r\n=lKUl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzWD8brLdiT6ckWHxIQjc3hYCRGEr9tETIobMdUAbEoAIgCbKRJbsJLMkai3HCI0xZkMUtIfG6Xr3g9zHFy/lYyWA="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_2.1.0-meta.1_1533274319403_0.4425175459141162"},"_hasShrinkwrap":false},"3.0.0-meta.1":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"3.0.0-meta.1","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"src/index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md src/index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=8.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","joi":"^13.5.2","uuid":"^3.2.1"},"devDependencies":{"chai":"^4.1.2","chai-as-promised":"^7.1.1","dirty-chai":"^1.2.2","jsdoc-to-markdown":"^4.0.1","mocha":"^5.2.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^6.1.4"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"semistandard":{"env":["mocha"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log JSON data to AMQP.\n\n## Purpose\n\nUse this for data dumps to AMQP.\n\n## Usage\n\n```js\nconst config = {\n  source: 'my-source',\n  amqp: { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo',\n  schemaVersion: 3\n }\n};\nconst Logger = require('log2amqp')(config);\nlet logger = Logger();\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush({ meta: {/* ... */} }).then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey\n});\n```\n\n`meta` defines an object you want to apply to the whole logger\nsession. It will be included at the top level in the logged payload (same level\nas `logs`). You may want to do this so you can e.g. easily index certain fields\nin the JSON payload  (if you are writing from the queue to a DB table) or just if\nthere are fields that apply across the whole session the you want to normalise for\nany reason.\n\n## API\n<a name=\"AMQPLogger\"></a>\n\n## AMQPLogger\nClass to manage a single logging session that collects logs and flushes them to\n AMQP.\n\n**Kind**: global class\n\n* [AMQPLogger](#AMQPLogger)\n    * [new AMQPLogger(config)](#new_AMQPLogger_new)\n    * [.log()](#AMQPLogger+log)\n    * [.flush()](#AMQPLogger+flush)\n\n<a name=\"new_AMQPLogger_new\"></a>\n\n### new AMQPLogger(config)\n- config\n  - source - the source you are logging from\n  - amqp.url - the url of the rabbitmq server\n  - amqp.exchange - the exchange that will be asserted and used to publish to\n  - amqp.routingKey - the RK to publish logs to\n  - schemaVersion - schema version to use. Valid values are 2, 3.\n\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\n<a name=\"AMQPLogger+log\"></a>\n\n### amqpLogger.log()\nAdd a log to the current state.\n\n**Kind**: instance method of [<code>AMQPLogger</code>](#AMQPLogger)\n<a name=\"AMQPLogger+flush\"></a>\n\n### amqpLogger.flush()\nFlush logs to AMQP as a single message.\n\n**Kind**: instance method of [<code>AMQPLogger</code>](#AMQPLogger)\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","readmeFilename":"README.md","gitHead":"1b41f5c4186353e35d7162517e68009cd6644bc2","_id":"log2amqp@3.0.0-meta.1","_npmVersion":"6.3.0","_nodeVersion":"8.11.2","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-F7CJzLuX4LRmi07iq8/8mpqyB7P9MIqH9Z0mmdHSQlSxgF0E+N53WLuXIXJEvttgFVeb7fc4K8LB+4PO8zlR0g==","shasum":"8cee9209cbf09074e1394239ce4b1ca145a739eb","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-3.0.0-meta.1.tgz","fileCount":8,"unpackedSize":14635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaoBoCRA9TVsSAnZWagAAJNMQAIC5DOurFVNaSZ95cYPs\n7wnxm2Aq13jv/foH1fwpRKaqEGtgF6arlgdy1AU92pnKunAu27h37657g3aH\nhusuyQSLFWGYn8Wn8iaoTuX0nxM4noY1aLM3CdUENtasbsmYyq+xKCyO4++d\n1rhgk73Rl+fNunb6uiMQaLQCv+PHsMBHy451gGtysVHRJ5pMrLvPaKB08Um/\n3179sPwd7R+ZDfU7OmtDToFkC3x8Iod++RxUz1spiqeyjmYtFYgi8gSscS3P\nAyoqfdJaW918CL1ToW/2q1MHKu+f/veitwo0s0sg43nIcDugn/TWpvy+5kRC\n/i80XtNu3j2aU9u+Kugw31ewZ+u7hHGAAEC9ZP4k18s3zz3yjEl+z/afNaqz\nmBfdkuMuOKhu6Z1J9hYeeJeY5fbSBdCRymP3r64VDZJkwAiLWlMEkRvi8lw6\nY6/eITbgKKKC04OwIB9s/1ziRf0a5iXL3YZmLHLzqiLu5L8mWmSwXCvP93/n\nfEMRpUYLjBt1rjfMjYPylysRHw7tXCS6eR6WTCpVtUG6luAfwLMDVB+W1Zxu\nYzrWqRYqV9Qax++mzMi+quqlW0mZJqaVCJ4hOG6hMAKefuYcfIoDVEqSSTd0\n0Kwz8Zs2+GW9CTSuE1q3KQbtdPTX+uZKWRXMFmvD81IX4Gp89wYF0j9ZAvkn\nDNrY\r\n=gpcR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgT7Az8vzm32TTW7U87ZBJWbP3UdFh3gTYhwH+cXmhSgIgDtJYRd4t7OWG3KT2cJolJbOlyr9R7et34PxbAR0TLS0="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_3.0.0-meta.1_1533706344839_0.8308726744153625"},"_hasShrinkwrap":false},"3.0.0":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"3.0.0","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"src/index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md src/index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=8.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","joi":"^13.5.2","uuid":"^3.2.1"},"devDependencies":{"chai":"^4.1.2","chai-as-promised":"^7.1.1","dirty-chai":"^1.2.2","jsdoc-to-markdown":"^4.0.1","mocha":"^5.2.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^6.1.4"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"semistandard":{"env":["mocha"]},"gitHead":"6de3baa262378dd607acce1779d91948297b32bb","_id":"log2amqp@3.0.0","_npmVersion":"6.3.0","_nodeVersion":"8.11.2","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-prW71Latkg9WUnSGMN1ipyYiRU5Rfdmt4cItk8qV5pwamlFy93ABKRFnIDTG24jEldMirz9EDjHxtGXiLmz9wg==","shasum":"1dbb97ddd6fc0b56d6d1782eaf7555a4f2708881","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-3.0.0.tgz","fileCount":8,"unpackedSize":14844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcMOuCRA9TVsSAnZWagAAJN4P/jJuKCUC/CV56P1jPlmm\nu8EEclp3HDTbjA9HVY7vCl+K3VNBegf9VMaJbwfP1OiFZo4p3Dk1o0oLcSuH\nszjdt1ibk9GXAxpthp0ZJQLHWPD5JSPP3mTGbPK/6FP5oyKB5rGRIu8GS/r6\n+llpLF2nmuaqgEVPNQLWNGXnuibkI3cNOU3+BKSLcS4GF+K4gv+TNo4qnoqG\nLENhtsCsrjn7tOKAcZXk6gOcspTJ9EASi9qqhRWbIWO8+ycPx9R4S7yFNdA6\nPT4Sij6uaW4gHz0RMfkdtqTSsHBZhfonNZ/2Jwk2CQkA1Py89Frd/u+r5s1k\nbY5VDx4MvhGxao7KX9FuKlblIIxLtxsPyTkcFvU9D8TjjzLRUylMlSrq6oLO\n3jvc5pYHtwRC7naRzkTzsZ001p9cbT+QL5a3oRtrCsw50f+diyRzSLvcXoKp\nVKjq2vf8ZSs1GCXgnDGXbG7V/R6/rnNaa0ZzkCfI8WMxoUW/WE5S0PsBdMPb\n4iTeWjdPpkQG7U4B7/fdIc4Smw0y0/ESXuYZLMzXWyDaljmrh6jmHBm/eKdg\nCR0JPPrtOYahXLGB/2wkWYNgMteqkV37EZYK0pMbXDQUKgFaIrAUEQztNv10\noeQ5xiCqcXKGRXBWMWcypKy9wFyObnyaBMuTDxMPrg8yLgGnogRYLcwgXC25\nDU56\r\n=lU52\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCH5B/HaLhA31PBBMzERMoopHqVvoMf8z4CrRW8TZ1saAIhANlkX4UfZR/JD6XI1YTA31/RihGo+XQ7UmzGPhxZF0l5"}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_3.0.0_1534116782370_0.5804621114055504"},"_hasShrinkwrap":false},"3.0.1":{"name":"log2amqp","description":"Log json data to amqp from express routes.","version":"3.0.1","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"src/index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md src/index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=8.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","joi":"^13.5.2","uuid":"^3.2.1"},"devDependencies":{"chai":"^4.1.2","chai-as-promised":"^7.1.1","dirty-chai":"^1.2.2","jsdoc-to-markdown":"^4.0.1","mocha":"^5.2.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^6.1.4"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"semistandard":{"env":["mocha"]},"gitHead":"e46c01163ff408c04b0f2567c281d4842fab7798","_id":"log2amqp@3.0.1","_npmVersion":"6.3.0","_nodeVersion":"8.11.2","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-f/DA4C6P6mg2aXuxrZ75BA78EhK/ALGqOknPyZQTHil0b8LAYQRK+SYqE1C8+NqTdwxYcvbTuj88GLiQjEWJbQ==","shasum":"1b8795f9bd84d91d602cbd2a98d12d6922e2124d","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-3.0.1.tgz","fileCount":8,"unpackedSize":14870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcQcjCRA9TVsSAnZWagAA4eYP+wSK+Lf5+etq+VQTlbov\nDFFwYP7KAvEBIs7Adsckd2/aZK6grzaBccGrj4i8kOYjfbRgFVh/FSOd6+6f\njUoMlGUyItlD8sNwuQpZQtLueWD0SWPo30BTl/QNe/klQr2nXJcmD3a14zoy\nf5IyZLcYe6ErBROu0J84HI6ZHPNQXSFeynAm35Qfmnn4ugCLq9p/LV4C2EXe\njeiyzIaNLcAe4MbMon/TEveVXZa9kfVJWacWVRuTr5X+goByqYLzjU5DEWbT\nid4KN2FuVi6XI48xhSbwMStM8lUoWQO4nIVVpqen9pEKKjF4ZFK1M6/8o86M\nQ4AHfi1unZWiW+vs2No8kvPi6hfdAio9JOEGNEGx7xjfg10+n4SCHWJZ33GV\nuGnj2bkfNfe8+wjDhshDdliaWE9TBRIESxdpQO1gY723s+BYgClc1HAeyYKj\nWDJIEXAmpXA5jgr4lYbAioBPmyfCSs1rVPEN9XEe1pWlJleyzn0GQ2ZlOy6Z\nZfqFHhfZZl649o8iJeaR+NQOsFiA9FIO9PeNT3uKmjH1MN28DYuw7SuRypIQ\njBPw13TX6MeULoCAq+eK8o3h18+QHPhIB0+ma3XBcOVXzldqN0yVK8dNnGZb\ncX9aHg1XdRq2Jm2g25PKStxuLvO3MVt8UCj7vdnA9yNj7Szxa/AZQPY6ijFd\natf+\r\n=ktV4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBsEHNJYHZqtVrVR86i7q47gZIOLtoSjRdvLxRzF0/9MAiEA27V5/tgTVm27MaIKwQsCckwoB6cebLs3UrmB214CWNs="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_3.0.1_1534134051489_0.2645308869630314"},"_hasShrinkwrap":false},"3.0.2-videos.0":{"name":"log2amqp","description":"Log json data to amqp.","version":"3.0.2-videos.0","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"src/index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md src/index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=8.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","joi":"^13.5.2","uuid":"^3.2.1"},"devDependencies":{"chai":"^4.1.2","chai-as-promised":"^7.1.1","dirty-chai":"^1.2.2","jsdoc-to-markdown":"^4.0.1","mocha":"^5.2.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^6.1.4"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"semistandard":{"env":["mocha"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log JSON data to AMQP.\n\n## Purpose\n\nUse this for data dumps to AMQP.\n\n## Usage\n\n```js\nconst config = {\n  source: 'my-source',\n  amqp: { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo',\n  schemaVersion: 3\n }\n};\nconst AMQPLogger = require('log2amqp');\nconst logger = new AMQPLogger(config);\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush({ meta: {/* ... */} }).then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey (schemaVersion === 2)\n  // OR\n  /* \n  [\n    { type: 'kind',\n     data: 'payload'\n     }, \n    {\n      type: 'kind2',\n      data: 'chris'\n    }\n  ] is flushed to amqp routingKey (schemaVersion === 3)\n  */\n});\n```\n\n`meta` defines an object you want to apply to the whole logger\nsession. It will be included at the top level in the logged payload (same level\nas `logs`). You may want to do this so you can e.g. easily index certain fields\nin the JSON payload  (if you are writing from the queue to a DB table) or just if\nthere are fields that apply across the whole session the you want to normalise for\nany reason.\n\n## API\n\n<a name=\"AMQPLogger\"></a>\n\n## AMQPLogger\nClass to manage a single logging session that collects logs and flushes them to\n AMQP.\n\n**Kind**: global class\n\n* [AMQPLogger](#AMQPLogger)\n    * [new AMQPLogger(config)](#new_AMQPLogger_new)\n    * [.log(type, payload)](#AMQPLogger+log)\n    * [.flush(opts)](#AMQPLogger+flush)\n\n<a name=\"new_AMQPLogger_new\"></a>\n\n### new AMQPLogger(config)\n- config\n  - source - the source you are logging from\n  - amqp.url - the url of the rabbitmq server\n  - amqp.exchange - the exchange that will be asserted and used to publish to\n  - amqp.routingKey - the RK to publish logs to\n  - schemaVersion - schema version to use. Valid values are 2, 3.\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\n<a name=\"AMQPLogger+log\"></a>\n\n### amqpLogger.log(type, payload)\nAdd a log to the current state. Each call to log() results in a entry\nadded to the 'data' array placed at the top level of the published json.\n\n**Kind**: instance method of [<code>AMQPLogger</code>](#AMQPLogger)\n\n| Param | Type |\n| --- | --- |\n| type | <code>string</code> |\n| payload | <code>object</code> |\n\n<a name=\"AMQPLogger+flush\"></a>\n\n### amqpLogger.flush(opts)\nopts.meta - This data is put in a top level 'meta' field in the published JSON.\n\n**Kind**: instance method of [<code>AMQPLogger</code>](#AMQPLogger)\n\n| Param | Type |\n| --- | --- |\n| opts | <code>object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","readmeFilename":"README.md","gitHead":"10aa74fb03d5c09415d00d652dd8df1466481098","_id":"log2amqp@3.0.2-videos.0","_npmVersion":"6.4.0","_nodeVersion":"8.11.2","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-bB8V2AWnEFpt2GwMtXN38t/dyn/GYm1BGJ1Y339ZMtCG9QffRHfUJxAvRtczGLAiEseV4zqKQSQaK6qV5y4Fog==","shasum":"5abf6a0bb7c4e1c1eec3982ab911f15c0a80048a","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-3.0.2-videos.0.tgz","fileCount":8,"unpackedSize":15527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblb+MCRA9TVsSAnZWagAAD28QAJhONhQ2WuEXJStzZzeu\ndUtzm6Pzs9hRTauIztuy+8HKmMvxUMPkfAmre6qOTHB8Ic6KdCqQ0nom0/3L\nLgSZHTh57iCdWJRcCX7MjOSsJoPI40f20rgAWecV8UMdKd+fV4NC9KNQWQQk\nYLyd+6tThNQHqhDpi47I3XOjgMisg488b2Ja90byx/3YwimIcZ9oijVUkMkE\nTpnzgllNIub2McAIieBp9tjx7FSoDgnFHKRKr4IhyZ8CD7wvs2xejWTaynwx\ngjxYwxnpQMmLnKiaqDRWcS176HJXSaB+lf7lNsueaSgYo8QwqIpN8Qv7L29A\n8zQpGbh3Og4o8nl8xyFmEis2EyHM8aH0jUcLobaagOaNn5m1XAGW4U/y/ISN\na4Nr8Ht0niJ9WAw7o4u8KSPIKvNiM5YsNpsduy1SKia63qVNvilsMaXAdglt\ng67oIYnXTL5MvSJ/T2NZtDqbvsly6XDUYb8S5Ng6eJWk7Z+KjnByOTMPQDPn\nterWuOX4Uff+MLQCt1YsywdexbLqgmXGxwT56y3lGhUfeFeapV0OI+J//BCv\nx0qJPTr9ljFBvGPmBUr0BWz4iih23ZxGg68Hd8wnJAViiDE3z2b0eVrnCbmU\nQ4wK6fTXHzV+o/e/Uz7TY3rI/7jtsARwdGX610tzqlryQdTwvp3rKFS6wYxk\n04vZ\r\n=QrRK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJYONqe0CvQZltP6Fk0sGRebvegFBM39MJMcwlshDKhAiAr5RhXPvLL0RTBeNHigUFnllQ+E3rfSzuxfBpGDJzOZQ=="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_3.0.2-videos.0_1536540556268_0.914193736606935"},"_hasShrinkwrap":false},"3.0.2-videos.1":{"name":"log2amqp","description":"Log json data to amqp.","version":"3.0.2-videos.1","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"src/index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md src/index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=8.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","joi":"^13.5.2","uuid":"^3.2.1"},"devDependencies":{"chai":"^4.1.2","chai-as-promised":"^7.1.1","dirty-chai":"^1.2.2","jsdoc-to-markdown":"^4.0.1","mocha":"^5.2.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^6.1.4"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"semistandard":{"env":["mocha"]},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log JSON data to AMQP.\n\n## Purpose\n\nUse this for data dumps to AMQP.\n\n## Usage\n\n```js\nconst config = {\n  source: 'my-source',\n  amqp: { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo',\n  schemaVersion: 3\n }\n};\nconst AMQPLogger = require('log2amqp');\nconst logger = new AMQPLogger(config);\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush({ meta: {/* ... */} }).then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey (schemaVersion === 2)\n  // OR\n  /* \n  [\n    { type: 'kind',\n     data: 'payload'\n     }, \n    {\n      type: 'kind2',\n      data: 'chris'\n    }\n  ] is flushed to amqp routingKey (schemaVersion === 3)\n  */\n});\n```\n\n`meta` defines an object you want to apply to the whole logger\nsession. It will be included at the top level in the logged payload (same level\nas `logs`). You may want to do this so you can e.g. easily index certain fields\nin the JSON payload  (if you are writing from the queue to a DB table) or just if\nthere are fields that apply across the whole session the you want to normalise for\nany reason.\n\n## API\n\n<a name=\"AMQPLogger\"></a>\n\n## AMQPLogger\nClass to manage a single logging session that collects logs and flushes them to\n AMQP.\n\n**Kind**: global class\n\n* [AMQPLogger](#AMQPLogger)\n    * [new AMQPLogger(config)](#new_AMQPLogger_new)\n    * [.log(type, payload)](#AMQPLogger+log)\n    * [.flush(opts)](#AMQPLogger+flush)\n\n<a name=\"new_AMQPLogger_new\"></a>\n\n### new AMQPLogger(config)\n- config\n  - source - the source you are logging from\n  - amqp.url - the url of the rabbitmq server\n  - amqp.exchange - the exchange that will be asserted and used to publish to\n  - amqp.routingKey - the RK to publish logs to\n  - schemaVersion - schema version to use. Valid values are 2, 3.\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\n<a name=\"AMQPLogger+log\"></a>\n\n### amqpLogger.log(type, payload)\nAdd a log to the current state. Each call to log() results in a entry\nadded to the 'data' array placed at the top level of the published json.\n\n**Kind**: instance method of [<code>AMQPLogger</code>](#AMQPLogger)\n\n| Param | Type |\n| --- | --- |\n| type | <code>string</code> |\n| payload | <code>object</code> |\n\n<a name=\"AMQPLogger+flush\"></a>\n\n### amqpLogger.flush(opts)\nopts.meta - This data is put in a top level 'meta' field in the published JSON.\n\n**Kind**: instance method of [<code>AMQPLogger</code>](#AMQPLogger)\n\n| Param | Type |\n| --- | --- |\n| opts | <code>object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","readmeFilename":"README.md","gitHead":"a1c85e83db80b6329acc5de5f84ce20d07f3c868","_id":"log2amqp@3.0.2-videos.1","_npmVersion":"6.4.0","_nodeVersion":"8.11.2","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-F8IHUW//dxmY09mkUX+ZstAGh8Lj8PDNKv/8bRbJwtNxP1DP1H82/yz5FyN5v5LoDXs54Ju4jb6Ihj00j+GkQw==","shasum":"9c621dedd76409147f4802f5216ef8e0114d3536","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-3.0.2-videos.1.tgz","fileCount":8,"unpackedSize":15547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblggtCRA9TVsSAnZWagAAfI4P/05vqMEtdneszKCDWJg+\nXZ7Mly2IxexvLwl0QztiSJ2xlOHTuul0c+BDysO+A4fBmPzCoT1z/z3/oa5t\nTa60nr0fVwYmWKcwLuOlUykCdOr1RiKcYTFjqxWj15hA9c1w0llBcekkdY3X\ndiLc0sE9cO0f2ogYtRlgZDXt2sO5UqSTwgNsH2hAKLvrF0gRl/jm+TUALTj8\nDx3LCSmKy6aIkV6lpwSDbIjU/qFSK1q9e3iqbDXpq05ko8YwNWv74mWxhXiZ\n+K2plZ0040yiiBipjdltiKcbc/VmBo3R1ZEKSLeq8jFEG8Io82np0u88xyB0\n4Xw8LmJ5MBzLJuG9deHyM2tdou5zEoi0w1BmqWxaUPJ3Xkp5UNFcoIttbEgp\nWNtsoYxD8DwYhJrzXDN9cn/r/xqPPVegb3utjth2N8L3RpsJTl6Dn0qwiCq3\ny56l0O27NgOFBbgrO3vpTg+mnhGVj34Dd/tzCKZA2wg4L66mLqIDo/cavITF\nBjNjfWktQAJk/U7HtY17YHPnZG8Nnhp9MtZ9I8T1KxHunSh6mBO6EXMG0X1e\ng9Cy4fdohj76MGKLb6SQdOrEBIt3Zigs0nSBIV2xxAmfqDUS3HMfHcANBxFb\nQas/WQvwexWEq0DMBSGrv0vYxt/I8VT/wlrIoZjcvJYMpx9l0iEpouUsPS8Z\nJIn4\r\n=S6y2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCI9lA6w/HNlo6KOeYi5YexEvWdenTsi1YvWiBtdOQCIAIhAIi3F7VKmlO/YPBbigkpYXxYNiDmbNAw0sPFrpm0b6zK"}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_3.0.2-videos.1_1536559148632_0.559428764600159"},"_hasShrinkwrap":false},"3.0.2":{"name":"log2amqp","description":"Log json data to amqp.","version":"3.0.2","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"src/index.js","scripts":{"coverage":"nyc -a -c -r html -r text npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md src/index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"engines":{"node":">=8.0","npm":"3.x"},"dependencies":{"amqp-wrapper":"^5.5.0","debug":"^2.6.6","joi":"^13.5.2","uuid":"^3.2.1"},"devDependencies":{"chai":"^4.1.2","chai-as-promised":"^7.1.1","dirty-chai":"^1.2.2","jsdoc-to-markdown":"^4.0.1","mocha":"^5.2.0","nyc":"^10.1.2","proxyquire":"^1.7.11","semistandard":"*","sinon":"^6.1.4"},"keywords":[],"nyc":{"exclude":["coverage","test"]},"semistandard":{"env":["mocha"]},"gitHead":"67b28310bc407259a5e3b0dc3981845a8247a1a0","_id":"log2amqp@3.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.11.2","_npmUser":{"name":"timlesallen","email":"allen.timothy.email@gmail.com"},"dist":{"integrity":"sha512-lTLNWd2uGUi/4FGV/ngy85yLYp9tkkcWmBRmjLoXYapsLfLEFLEP9HMbssYHxSGvVQPkLrytPD/NRsKrq39bQQ==","shasum":"a1562b0aeaf6153de577b02f929da65fe5c95b5b","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-3.0.2.tgz","fileCount":8,"unpackedSize":15538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqFoYCRA9TVsSAnZWagAAgKoP/Aq8xX/SvrZ4WNqb41/l\n7EgsN4TYP7h6lYvMB5Yf2lbsown77ghsWElw8FzXTlrrp3ngcVatzr2Lhzc9\nLJjJ9Zy4d+ONoDKaRh3TTKeXu3A0yP8VcmTXYceOy8+dlCTLOYrWl2ihLpiN\ntobRBWRzUBoGLB56iWmaDX4Jb7TctXPHPaEvexo5yKLqftXPcf2gCF+T2vjU\nihE/Ym23iKPM3m0kcaRM8dYaQLHpiiaqqYgUaUjbEwgqsfg9Yde0GHCqGmb6\nFg4CfhA4F14TftiwTsqu4jN/2TFTQD+XTpORg8j+CUsfQ1WTDMD/ZXed4fTr\nuUFN5yY53ADRDXJp1Vvx3zXMyQmfdcO4+Q5//fPQSlBR3J7gcFjIDlSeR8oh\nHstnGLHPwr4xddEKlPfbshmXoWxfjkvlxXx8MrOgq4u0fkIwZE+6BkPL7CAi\nUZQZzAZ/ypalnxG2I4sBkpV7YpFek+RWEQkkT7EOcqYM6lrWJNk2dz+kE5fW\nz9QEQKnkbjAU9a6DrAgTndw+NPaTaaxteS5OYmQqTZ9ZMAFqA9kU1E2Uso5J\nxz5iVqoG1cYgGFsoPkUPC9R6og5qitlWSr+qqxOtx6NtD6f55VkD+n2gJmFM\nduf1nlTu1y1nnu45TW8ImArIrmnlSrN7/AZIQ39yYCqjz9ZfoZ95Z+4dvnMh\ndKXQ\r\n=nRJo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpn3WHy9SpomOOot2JQXwBBEiqubbI99scvceqavLHCQIgXHCLvCF6imELpNd0hmeNhWO4DmN6hKoOTwXIoYrV3gc="}]},"maintainers":[{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_3.0.2_1537759767819_0.3836018224457878"},"_hasShrinkwrap":false},"3.0.3":{"name":"log2amqp","description":"Log json data to amqp.","version":"3.0.3","author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"license":"BSD","main":"src/index.js","scripts":{"coverage":"c8 npm test","pretest":"semistandard --env mocha","test":"mocha --recursive test","watch":"mocha --recursive --watch test","docs":"jsdoc2md src/index.js"},"homepage":"https://github.com/noblesamurai/node-log2amqp","repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"dependencies":{"amqplib":"^0.7.1","debug":"^2.6.6","joi":"^13.5.2","simple-amqplib":"^7.0.4","uuid":"^3.2.1"},"devDependencies":{"c8":"^7.7.1","chai":"^4.3.4","chai-as-promised":"^7.1.1","dirty-chai":"^2.0.1","jsdoc-to-markdown":"^7.0.1","mocha":"^8.3.2","proxyquire":"^2.1.3","semistandard":"*","sinon":"^10.0.0"},"keywords":[],"c8":{"all":true,"include":["src"],"reporter":["lcov","text"]},"semistandard":{"env":["mocha"]},"gitHead":"07339479cef37aa3437e82a749e1eaa2d47b6922","_id":"log2amqp@3.0.3","_nodeVersion":"14.15.4","_npmVersion":"7.8.0","dist":{"integrity":"sha512-b3LVO5TT4hP/C2xKhnRd2pE+nnEZ7rd3TPNsMSHHxbZDhG1X9H7WQ91rHGsVsyI2PqLB66Oqyt5W0RBapbf+pA==","shasum":"3318ea41a863096c798828af6ab71b9da5f33ec0","tarball":"https://registry.npmjs.org/log2amqp/-/log2amqp-3.0.3.tgz","fileCount":8,"unpackedSize":15820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2yO/CRA9TVsSAnZWagAA+8cP/ROuEYsMB2fo+Lan93Fd\n2JR/6nZPqGbxmMC8xWbpLtb3wYSO91/vXd/B2Qb3OAO1ARSJJ1oVPrQOhaev\nOgBZWgczhnnTVtNMuxVgw6M5RB6Kz8pgxFtYN7DrcJU1ufRz0VNWWztGqZSP\nYPRWsCrwxtK+oDkaFCQA2lNnqeTD6KnPQji2PIs401Sz/VWxs/Xaz2IkjzPT\nJQJ0KAMNQchtnfqHZDPVDdbaQ6FNYg/LpHv8zqx68z3Tff/VIsPXXeTK0yFX\nfccH/PK+P2AOE5aMLj3ptiHy1kFLuw+mDuvKx2XWnfQsveV6tDLWQRXzCCup\nBzcin95i+jpI8ZlmGTZqmU4TymUX3HBPUgwY93BE/VG56VJ+hkQ3NRGn5dj1\nGVQsKzMGmv/mgbH1QmQM3uwP6RT+VYgighamzCkdP3kTrzUfgF/slOp/Sp7I\nZbciqssEjPN53b3B+wPmxxVO/x89zqNJgDKTknkllAb4SfaxvQofzPqESpRC\ngnq+3/5JoFXIl2SB4iqwbuCJWE6q0NzWjs71KKOfggN/b250eLOFa/c3r11d\nocmPOzGmWyN994i5CfTCuyU6DzWSKQHPxe1k8DeD9nWxOoeCxXz0cHoOxrRy\nQwZVDcfGw9klTyMwh2fGltyE4FiHOrNfrp5eZrV50GUWHH1/OIazRpLNbcNb\nvsMD\r\n=2TMO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkBQwSlxllLBg4BzzkEyGva47v4wGe05RUUSvBoTFsFQIhAILw9A+mqB5yoxpUn0QOtRhIytXGl1WTeOVS8TOtkp0x"}]},"_npmUser":{"name":"aeh","email":"andrew@noblesamurai.com"},"directories":{},"maintainers":[{"name":"jacob-samurai","email":"jacob@noblesamurai.com"},{"name":"watermelonpizza","email":"watermelonpizza@melonstudios.net"},{"name":"noblesamurai","email":"npm@noblesamurai.com"},{"name":"eugeneware","email":"eugene@noblesamurai.com"},{"name":"aeh","email":"andrew@noblesamurai.com"},{"name":"jeffroh81","email":"jeffroh81@gmail.com"},{"name":"wayno","email":"wayne@noblesamurai.com"},{"name":"tomns","email":"tom@noblesamurai.com"},{"name":"graven","email":"brendan@noblesamurai.com"},{"name":"timlesallen","email":"allen.timothy.email@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log2amqp_3.0.3_1618921234886_0.3321286011404898"},"_hasShrinkwrap":false}},"readme":"# log2amqp [![Build Status](https://travis-ci.org/noblesamurai/node-log2amqp.svg?branch=master)](http://travis-ci.org/noblesamurai/node-log2amqp) [![NPM version](https://badge-me.herokuapp.com/api/npm/log2amqp.png)](http://badges.enytc.com/for/npm/log2amqp)\n\n> Log JSON data to AMQP.\n\n## Purpose\n\nUse this for data dumps to AMQP.\n\n## Usage\n\n```js\nconst config = {\n  source: 'my-source',\n  amqp: { url: 'amqp://user:pw@myserver/blah', exchange: 'myexchange', routingKey: 'keyToRouteTo',\n  schemaVersion: 3\n }\n};\nconst AMQPLogger = require('log2amqp');\nconst logger = new AMQPLogger(config);\npayload = { this: 'thing'};\nlogger.log('kind', payload);\nlogger.log('kind2', 'chris');\nlogger.flush({ meta: {/* ... */} }).then(() => {\n  // [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey (schemaVersion === 2)\n  // OR\n  /* \n  [\n    { type: 'kind',\n     data: 'payload'\n     }, \n    {\n      type: 'kind2',\n      data: 'chris'\n    }\n  ] is flushed to amqp routingKey (schemaVersion === 3)\n  */\n});\n```\n\n`meta` defines an object you want to apply to the whole logger\nsession. It will be included at the top level in the logged payload (same level\nas `logs`). You may want to do this so you can e.g. easily index certain fields\nin the JSON payload  (if you are writing from the queue to a DB table) or just if\nthere are fields that apply across the whole session the you want to normalise for\nany reason.\n\n## API\n\n<a name=\"AMQPLogger\"></a>\n\n## AMQPLogger\nClass to manage a single logging session that collects logs and flushes them to\n AMQP.\n\n**Kind**: global class\n\n* [AMQPLogger](#AMQPLogger)\n    * [new AMQPLogger(config)](#new_AMQPLogger_new)\n    * [.log(type, payload)](#AMQPLogger+log)\n    * [.flush(opts)](#AMQPLogger+flush)\n\n<a name=\"new_AMQPLogger_new\"></a>\n\n### new AMQPLogger(config)\n- config\n  - source - the source you are logging from\n  - amqp.url - the url of the rabbitmq server\n  - amqp.exchange - the exchange that will be asserted and used to publish to\n  - amqp.routingKey - the RK to publish logs to\n  - schemaVersion - schema version to use. Valid values are 2, 3.\n\n| Param | Type |\n| --- | --- |\n| config | <code>Object</code> |\n\n<a name=\"AMQPLogger+log\"></a>\n\n### amqpLogger.log(type, payload)\nAdd a log to the current state. Each call to log() results in a entry\nadded to the 'data' array placed at the top level of the published json.\n\n**Kind**: instance method of [<code>AMQPLogger</code>](#AMQPLogger)\n\n| Param | Type |\n| --- | --- |\n| type | <code>string</code> |\n| payload | <code>object</code> |\n\n<a name=\"AMQPLogger+flush\"></a>\n\n### amqpLogger.flush(opts)\nopts.meta - This data is put in a top level 'meta' field in the published JSON.\n\n**Kind**: instance method of [<code>AMQPLogger</code>](#AMQPLogger)\n\n| Param | Type |\n| --- | --- |\n| opts | <code>object</code> |\n\nNote: To regenerate this section from the jsdoc run `npm run docs` and paste\nthe output above.\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install log2amqp\n```\n## License\n\nThe BSD License\n\nCopyright (c) 2017, Tim Allen\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n* Neither the name of the Tim Allen nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","maintainers":[{"email":"npm@noblesamurai.com","name":"noblesamurai"},{"email":"eugene@noblesamurai.com","name":"eugeneware"},{"email":"jacob@noblesamurai.com","name":"jacob-samurai"},{"email":"allen.timothy.email@gmail.com","name":"timlesallen"}],"time":{"modified":"2022-06-19T13:46:29.626Z","created":"2017-05-14T23:53:14.870Z","1.0.0":"2017-05-14T23:53:14.870Z","1.1.0":"2017-05-15T00:56:44.769Z","1.1.1":"2017-05-30T04:11:32.231Z","1.1.2-1":"2017-08-23T23:21:51.401Z","1.1.2":"2017-08-24T01:06:55.938Z","2.0.0-unique.0":"2018-04-23T04:20:00.388Z","2.0.0-unique.1":"2018-04-23T04:38:43.433Z","2.0.0-unique.2":"2018-04-24T01:54:24.840Z","2.0.0-unique.3":"2018-04-24T03:40:56.010Z","2.0.0-unique.4":"2018-04-27T02:03:55.922Z","2.0.0-unique.5":"2018-04-27T02:57:44.088Z","2.0.0":"2018-04-29T22:24:44.894Z","2.1.0-meta.0":"2018-08-03T05:11:02.972Z","2.1.0-meta.1":"2018-08-03T05:31:59.465Z","2.1.0-meta.2":"2018-08-08T05:25:52.482Z","3.0.0-0":"2018-08-08T05:27:24.699Z","3.0.0-meta.0":"2018-08-08T05:28:17.828Z","3.0.0-meta.1":"2018-08-08T05:32:24.958Z","3.0.0":"2018-08-12T23:33:02.448Z","3.0.1":"2018-08-13T04:20:51.643Z","3.0.2-videos.0":"2018-09-10T00:49:16.408Z","3.0.2-videos.1":"2018-09-10T05:59:08.746Z","3.0.2":"2018-09-24T03:29:28.046Z","3.0.3":"2021-04-20T12:20:35.043Z"},"homepage":"https://github.com/noblesamurai/node-log2amqp","keywords":[],"repository":{"type":"git","url":"git://github.com/noblesamurai/node-log2amqp.git"},"author":{"name":"Tim Allen","email":"tim@noblesamurai.com"},"bugs":{"url":"https://github.com/noblesamurai/node-log2amqp/issues"},"license":"BSD","readmeFilename":"README.md"}