{"name":"restify-logger","version":"2.0.1","description":"A custom logger for restify","main":"lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/AnyFetch/restify-logger.git"},"keywords":["restify","logger","morgan"],"author":{"name":"Quentin Buathier","email":"quentin.buathier@epitech.eu"},"contributors":[{"name":"Antoine Bolvy","email":"antoine.bolvy@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/AnyFetch/restify-logger/issues"},"homepage":"https://github.com/AnyFetch/restify-logger","dependencies":{"morgan":"^1.3.2"},"_id":"restify-logger@2.0.1","dist":{"shasum":"bedaa83139a6f66e922e3d23da9d579f92ca9202","tarball":"http://registry-npm.ywwl.com/restify-logger/download/restify-logger-2.0.1.tgz","integrity":"sha512-6sLjJ9s9OX3Tk3c6tpUfUV8J/vM4ol0kDM0NCMAW/ucxiVGFBY1sVJCkOu3bppfgTEzj8EzDE6v0wPFn2LD3fQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsMb9NY7reC362MEubNxo4FAX2OVsd+D94Fv7VXfKLaQIgCzweRkB3FIC801jMLzlvuWF1VuxNfIV6XAqLf/aCj/Q="}],"size":2095,"noattachment":false,"key":"/restify-logger/-/restify-logger-2.0.1.tgz"},"_from":".","_npmVersion":"1.3.13","_npmUser":{"name":"matthieu.bacconnier","email":"matthieu.bacconnier@papiel.fr"},"maintainers":[{"name":"quentin01","email":"quentin.buathier@epitech.eu"},{"name":"matthieu.bacconnier","email":"matthieu.bacconnier@papiel.fr"},{"name":"saveman71","email":"antoine.bolvy@gmail.com"}],"directories":{},"readme":"# Restify logger\n> Visit http://anyfetch.com for details about AnyFetch.\n\nCustomizable logger for Restify based on [mogan](https://github.com/expressjs/morgan).\n\n# Usage\n\n```js\nvar logger = require('restify-logger');\n\n// You can use the skip parameter to skip some requests\napp.use(logger('custom', {\n  skip: function (req) {\n    return process.env.NODE_ENV === \"test\" || req.method === \"OPTIONS\" || req.url === \"/status\";\n  }\n}));\n```\n\nThis will display:\n```\nDELETE ???:/user/542d5154d0db17c03ecd1499 25ms 204\n```\n\n## Overriding tokens\nYou can specify a function to be used by the `user` token:\n```js\n// Overwrite the default user function, that only writes '???:'\nlogger.token('user', function(req) {\n  return (req.user && req.user.email || '???') + ':';\n});\n```\n\nThis will display:\n```\nDELETE test@anyfetch.com:/user/542d5154d0db17c03ecd1499 25ms 204\n```\n\n## Overriding formats\n```js\nvar logger = require('restify-logger');\n\n// morgan syntax\nlogger.format('my-simple-format', ':method :url :status')\napp.use(logger('my-simple-format'));\n```\n\nThis will display:\n```\nDELETE /user/542d5154d0db17c03ecd1499 204\n```\n\n\nSupport: `support@anyfetch.com`.\n","publish_time":1412331217096,"_cnpm_publish_time":1412331217096,"dist-tags":{"latest":"2.0.1"}}