{"_id":"@aqm/queuelogger","_rev":"5-bd44db1aeab2b0752e078254b901cc4a","name":"@aqm/queuelogger","dist-tags":{"latest":"2.0.0"},"versions":{"0.0.0":{"name":"@aqm/queuelogger","version":"0.0.0","description":"CFWare AQM queue_log mysql writer","main":"index.js","scripts":{"test":"xo && nyc mocha"},"engines":{"nodejs":">=8"},"repository":{"type":"git","url":"git+https://github.com/cfware/queuelogger.git"},"author":{"name":"Corey Farrell"},"license":"MIT","keywords":["asterisk","queue_log","queuemetrics","mysql"],"files":["*.js","sampledb","test"],"bugs":{"url":"https://github.com/cfware/queuelogger/issues"},"homepage":"https://github.com/cfware/queuelogger#readme","publishConfig":{"access":"public"},"config":{"dbhost":"localhost","dbprivuser":"root","dbprivpassword":""},"dependencies":{"@cfware/p-mutex":"^0.1.0","mysql":"^2.15.0","p-event":"^1.3.0"},"devDependencies":{"eslint":"^4.17.0","mocha":"^5.0.1","nyc":"^11.4.1","xo":"^0.20.2"},"xo":{"rules":{"comma-dangle":["error","always-multiline"],"camelcase":["error",{"properties":"never"}],"max-params":"off"}},"nyc":{"check-coverage":true,"per-file":true,"lines":100,"statements":100,"functions":100,"branches":100,"include":["index.js"]},"gitHead":"dc4516d01f5d00665196f92d3cbd835f07a0fef9","_id":"@aqm/queuelogger@0.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"coreyfarrell","email":"git@cfware.com"},"dist":{"integrity":"sha512-W+hx22EeKTilpwNvIQkNIyzR4nHrNV98KzS5gZcppeXk1PygdK2hQ9bH3aQWVVlzn/SYlSEW7dBDmZ091I/wPA==","shasum":"b731ee4db7e869525a892d9b821195d010315649","tarball":"https://registry.npmjs.org/@aqm/queuelogger/-/queuelogger-0.0.0.tgz","fileCount":6,"unpackedSize":12917,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+A2s29OFsu8MPyyNv/xpU6006BaKSQi3vxK3O/qp/JAiAnNjxPtcy2BkSNsHd4GlTTWNnfLF0pN7bDsw0uziXKcQ=="}]},"maintainers":[{"name":"coreyfarrell","email":"git@cfware.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/queuelogger_0.0.0_1518774487973_0.03769190362831787"},"_hasShrinkwrap":false},"1.0.0":{"name":"@aqm/queuelogger","version":"1.0.0","description":"CFWare AQM queue_log mysql writer","main":"index.js","scripts":{"test":"xo && nyc mocha"},"engines":{"nodejs":">=8"},"repository":{"type":"git","url":"git+https://github.com/cfware/queuelogger.git"},"author":{"name":"Corey Farrell"},"license":"MIT","keywords":["asterisk","queue_log","queuemetrics","mysql"],"files":["*.js","sampledb","test"],"bugs":{"url":"https://github.com/cfware/queuelogger/issues"},"homepage":"https://github.com/cfware/queuelogger#readme","publishConfig":{"access":"public"},"config":{"dbhost":"localhost","dbprivuser":"root","dbprivpassword":""},"dependencies":{"@cfware/p-mutex":"^0.1.0","mysql":"^2.15.0","p-event":"^1.3.0"},"devDependencies":{"eslint":"^4.17.0","mocha":"^5.0.1","nyc":"^11.4.1","xo":"^0.20.2"},"xo":{"rules":{"comma-dangle":["error","always-multiline"],"camelcase":["error",{"properties":"never"}],"max-params":"off"}},"nyc":{"check-coverage":true,"per-file":true,"lines":100,"statements":100,"functions":100,"branches":100,"include":["index.js"]},"gitHead":"fceca683abb7b86324cb1be567ff806e4ee96b0d","_id":"@aqm/queuelogger@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"coreyfarrell","email":"git@cfware.com"},"dist":{"integrity":"sha512-jYvhSlMk12yDDr+ZcXUwjNLtfvIfK3OsfYIYnhgh4Y/uFZcOvNGq+cmUNkzqA/qYd5dZV7o9p0qaRED1XMquFg==","shasum":"65227e1cf29c837db2b38052adbc3f65c4f76a2f","tarball":"https://registry.npmjs.org/@aqm/queuelogger/-/queuelogger-1.0.0.tgz","fileCount":6,"unpackedSize":12941,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRQz3/FycVPGo2o7mZnYnr3n3EdUib+eMMIet/+X07fgIgbewlaaN91mF4hreb13wqmyq8M++S2QbT/+V1TU5MSYs="}]},"maintainers":[{"name":"coreyfarrell","email":"git@cfware.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/queuelogger_1.0.0_1518774990357_0.07575587058425604"},"_hasShrinkwrap":false},"1.1.0":{"name":"@aqm/queuelogger","version":"1.1.0","description":"CFWare AQM queue_log mysql writer","main":"index.js","scripts":{"release":"standard-version --sign","test":"xo && nyc mocha"},"engines":{"nodejs":">=8"},"repository":{"type":"git","url":"git+https://github.com/cfware/queuelogger.git"},"author":{"name":"Corey Farrell"},"license":"MIT","keywords":["asterisk","queue_log","queuemetrics","mysql"],"bugs":{"url":"https://github.com/cfware/queuelogger/issues"},"homepage":"https://github.com/cfware/queuelogger#readme","publishConfig":{"access":"public"},"config":{"dbhost":"localhost","dbprivuser":"root","dbprivpassword":""},"dependencies":{"@cfware/p-mutex":"^0.1.0","mysql2":"^1.6.5","p-event":"^4.0.0"},"devDependencies":{"mocha":"^6.0.2","nyc":"^13.3.0","standard-version":"^5.0.2","xo":"^0.24.0"},"xo":{"rules":{"camelcase":["error",{"properties":"never"}],"max-params":"off"}},"nyc":{"check-coverage":true,"per-file":true,"lines":100,"statements":100,"functions":100,"branches":100,"include":["index.js"]},"gitHead":"a6d032324f00e1042f4bf0fe80ac6bc42cb112c9","_id":"@aqm/queuelogger@1.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"coreyfarrell","email":"git@cfware.com"},"dist":{"integrity":"sha512-/MM/fQhaxZnA6q61Ya8WktKxVszpFCokH0TYBpOtWBH87uTAnbCL2xw/XvBSzIshDj5QLMuhvx4FOcLT0hS4kg==","shasum":"0df7c0511b61670267a4a925532e1dd806a71f5a","tarball":"https://registry.npmjs.org/@aqm/queuelogger/-/queuelogger-1.1.0.tgz","fileCount":7,"unpackedSize":13719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmCaACRA9TVsSAnZWagAA9BAP/1qjxhjJYoDPTQzuSzLl\nYY+b6dqjKwWwESuDI0Dk67PoutwveHa/49/l0BRXEz1jKbw7iYF/2JZBFDAr\n1qwhUM6q02z4e710/Ut8JxeDF+y2BBP7rY3xnTb5ImXkO2nOxD5AsXciQfVq\na93h/Pb3/hAMJ50D3ah379++w3iVNrMWruJdLJ8TeiF4cNNuCYEoOOGA74jd\nJrlML4fPHD3dHft2nb2cJ8xWFCaEgFxtFMVSC7/JSiSC1ZiGyThIN29dKj9G\nuuxnq5CG/2IHOyIkaIRJwnTYdc94N3/H3eJjrp7VYq0kdGxOCuQjxypD1UmA\nNgs8jc4lcJVKYBA5E4SaveKSlipKtjekIxf0/v0hwDz3YhxcbKLoRjXDgDQ9\nmIyAcZhxCuf7GoDk6TaTzoJGVMyU4DDTRud56QkkScq7AApofmf9/i9IcXsq\nLA+bzCjMc5VnbWztCR4jeSy3vlrpe69bAbMLh7h9omeFXE9lpmZJ4R+XLvEC\nwAnk9gQHOzKpNxakHLPtQGWS/6HpcPOGOgty0RasjnADfffD1ih26qMYQcLh\nIcRUAU2uelzBwlNt8KD6LGFAl+tMZ8+QLf+aqYNu5hPwZ7F0RyKFlkGgpljP\nLuRSY0vKUKfFlRnn7lTsOWC375x0DlNLBlt/Kx0OPOOjO6asLN1NREfVk6Cr\ndeKM\r\n=f6Pr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2uKGF8Y/JGxiPWdJs87XTmfs09OUFQ81xGl+LEh9A4AiAQXW66e8qY7vB0DHMwBWnaSwntgCyr/sGV0AEYFq3LvQ=="}]},"maintainers":[{"name":"coreyfarrell","email":"git@cfware.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/queuelogger_1.1.0_1553475199425_0.6879714583900187"},"_hasShrinkwrap":false},"2.0.0":{"name":"@aqm/queuelogger","version":"2.0.0","description":"CFWare AQM queue_log mysql writer","scripts":{"release":"standard-version --sign","test":"xo && nyc ava"},"engines":{"nodejs":">=12"},"repository":{"type":"git","url":"git+https://github.com/cfware/queuelogger.git"},"author":{"name":"Corey Farrell"},"license":"MIT","keywords":["asterisk","queue_log","queuemetrics","mysql"],"bugs":{"url":"https://github.com/cfware/queuelogger/issues"},"homepage":"https://github.com/cfware/queuelogger#readme","publishConfig":{"access":"public"},"config":{"dbhost":"localhost","dbprivuser":"root","dbprivpassword":""},"dependencies":{"@cfware/p-mutex":"^0.2.0","mysql2":"^1.6.5","p-event":"^4.1.0"},"devDependencies":{"@cfware/eslint-config-node":"^0.1.0","@cfware/nyc":"^0.5.0","ava":"^2.1.0","nyc":"^14.1.1","standard-version":"^6.0.1","xo":"^0.24.0"},"xo":{"extends":"@cfware/eslint-config-node","rules":{"camelcase":["error",{"properties":"never"}],"max-params":"off"}},"gitHead":"da55407c4a7a60953c38d109b0323cb916bcd272","_id":"@aqm/queuelogger@2.0.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-KbcOMaaw/jGGKpKS8Tro5BV0OxpTPr2hi+bTnPbSilkiT/rmc6oRS8teBZKzY9PMmPwGCWIIGYvLig9UXIqEsg==","shasum":"724bb078211dfb8effaf85ce326f42e4e5738a79","tarball":"https://registry.npmjs.org/@aqm/queuelogger/-/queuelogger-2.0.0.tgz","fileCount":6,"unpackedSize":9183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBMgqCRA9TVsSAnZWagAAwiUP/iujRJusZu2NYhKP57TV\nzTuSb8dIwvaYVQBI/h7Via3rodqjvbaeZuHH5PujOgBBRQiauQGcPnjm0uwZ\nifPQrf29zTQOHOjTJZpNU+EZ1k1jpRBsWzKbb0cHKV0aQnrFfkVBDiXbn3wG\n3pV84ABUf8w+Os6Htnersg3pQqKTfWj8jyq2LM34XfCzWzvUE1hF5Bx+T500\nBzLicjdqBxid/PEtWrmCOtQGUhkfisk0bf0LfGTg6W8a2zHbm1Z4kzceVV1f\nwwC5WN/kBuoIKH155nUSJr9ZxsXRBbHYXdx7tE1fGXbA/18VijB0k2+rJiAA\ny0F9kuCWOiIAE/Ot4Srjiztcm2X8gcIqUmDXUENaBkbuINi/kqhu3qShn87M\nSccrXECmqGFZX1y4kTHXiMaq88muf0qkQlVv0tfWU6g8W6QzrAbaPVANwekc\nxoZFwf9+X7p3J618PmDK6eJlg2olbBxKlZSmLILS/qNMCWYCXlmv2Ls/9elt\n2ECk/rInDMv8CexxPfsZPMYIRY7kkPs+eGCStjy27MPYWGwC+iWH08fgSAw4\nJ3ZEP1nq9ETSFi2mUyujdFdPa/km8RkK7/8U3yeymxIOOaVNgecLHcv8zYZQ\nGXXFbMBQxOnInmgp7CrYSORu5U6jGuVDFQJefFllpbkQChdDle0t9N1J1DaT\nBE48\r\n=XTJg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJu5z2y7hwp6WAY3rr2aR7aSsRgyEgN/0YFMW/exO1IAiEAzaPozpgYHlpwMFN2b8NBKvIJlLfx7EX5XOefqsr4bX8="}]},"maintainers":[{"name":"coreyfarrell","email":"git@cfware.com"}],"_npmUser":{"name":"coreyfarrell","email":"git@cfware.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/queuelogger_2.0.0_1560594474061_0.5606324682682926"},"_hasShrinkwrap":false}},"time":{"created":"2018-02-16T09:48:07.879Z","0.0.0":"2018-02-16T09:48:08.039Z","modified":"2022-04-04T15:13:38.673Z","1.0.0":"2018-02-16T09:56:30.433Z","1.1.0":"2019-03-25T00:53:19.569Z","2.0.0":"2019-06-15T10:27:54.188Z"},"maintainers":[{"name":"coreyfarrell","email":"git@cfware.com"}],"description":"CFWare AQM queue_log mysql writer","homepage":"https://github.com/cfware/queuelogger#readme","keywords":["asterisk","queue_log","queuemetrics","mysql"],"repository":{"type":"git","url":"git+https://github.com/cfware/queuelogger.git"},"author":{"name":"Corey Farrell"},"bugs":{"url":"https://github.com/cfware/queuelogger/issues"},"license":"MIT","readme":"# @aqm/queuelogger\n\n[![Travis CI][travis-image]][travis-url]\n[![Greenkeeper badge](https://badges.greenkeeper.io/cfware/queuelogger.svg)](https://greenkeeper.io/)\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![MIT][license-image]](LICENSE)\n\nCFWare AQM queue_log mysql writer\n\n### Install @aqm/queuelogger\n\nThis module requires node.js 12 or above.\n\n```sh\nnpm i --save @aqm/queuelogger\n```\n\n## Usage\n\n```js\nimport {QueueLogger} from '@aqm/queuelogger';\n\nclass QueueManager {\n\tconstructor() {\n\t\tthis.logger = new QueueLogger({\n\t\t\t/* Default is 'P001', used as value of partition column. */\n\t\t\tpartition: 'P001',\n\t\t\t/* Default is least significant part of hostname, used as value of serverid column. */\n\t\t\tserverID: 'serverid',\n\t\t\t/* Default: 'queue_log', the table we insert to. */\n\t\t\ttableName: 'queue_log',\n\t\t\t/* Override default settings used by require('mysql').createPool.\n\t\t\t * The default database is queuemetrics.\n\t\t\t */\n\t\t\tmysql: {},\n\t\t});\n\n\t\tprocess.on('SIGTERM', () => this.logger.end().catch(() => {}));\n\t}\n\n\tasync writeQueueLog(timeID, callID, queue, agent, verb, data1, data2, data3, data4, data5) {\n\t\t/* This is a pointless example.  In real life a queue manager would retrieve some\n\t\t * data from a channel or other object. */\n\t\ttry {\n\t\t\tawait this.logger.writeEntry(timeID, callID, queue, agent, verb, data1, data2, data3, data4, data5);\n\t\t} catch (err) {\n\t\t\t/* mysql write failed, record to a file. */\n\t\t}\n\t}\n}\n```\n\n## Running tests\n\nTests are provided by eslint and mocha.  Tests require access to a test mysql or\nmariadb daemon.  The test database server must have a `queuemetrics` database and\na `queuelogd` user as defined by `sampledb/qm.sql`.\n\nDefault test configuration:\n```sh\nnpm config set @aqm/queuelogger:dbhost 'localhost'\nnpm config set @aqm/queuelogger:dbprivuser 'root'\nnpm config set @aqm/queuelogger:dbprivpassword ''\n```\n\nThese settings can be changed to use a different server or to use an account less\nprivileged than root.  The `priv` account must have SELECT and DELETE access to\nthe `queuemetrics.queue_log` table.\n\nOnce the database is created and a privileged account configured the tests can be run:\n```sh\nnpm install\nnpm test\n```\n\n[npm-image]: https://img.shields.io/npm/v/@aqm/queuelogger.svg\n[npm-url]: https://npmjs.org/package/@aqm/queuelogger\n[travis-image]: https://travis-ci.org/cfware/queuelogger.svg?branch=master\n[travis-url]: https://travis-ci.org/cfware/queuelogger\n[downloads-image]: https://img.shields.io/npm/dm/@aqm/queuelogger.svg\n[downloads-url]: https://npmjs.org/package/@aqm/queuelogger\n[license-image]: https://img.shields.io/github/license/cfware/queuelogger.svg\n","readmeFilename":"README.md"}