{"_id":"restify-logger","_rev":"1927320","name":"restify-logger","description":"A custom logger for restify","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"matthieu.bacconnier","email":"matthieu.bacconnier@papiel.fr"},{"name":"quentin01","email":"quentin.buathier@epitech.eu"},{"name":"saveman71","email":"antoine.bolvy@gmail.com"}],"time":{"modified":"2021-12-09T13:51:53.000Z","created":"2014-10-02T16:03:39.947Z","2.0.1":"2014-10-03T10:13:37.096Z","1.0.0":"2014-10-02T16:03:39.947Z"},"users":{},"author":{"name":"Quentin Buathier","email":"quentin.buathier@epitech.eu"},"repository":{"type":"git","url":"https://github.com/AnyFetch/restify-logger.git"},"versions":{"2.0.1":{"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","size":2095,"noattachment":false,"key":"/restify-logger/-/restify-logger-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/restify-logger/download/restify-logger-2.0.1.tgz"},"_from":".","_npmVersion":"1.3.13","_npmUser":{"name":"matthieu.bacconnier","email":"matthieu.bacconnier@papiel.fr"},"maintainers":[{"name":"matthieu.bacconnier","email":"matthieu.bacconnier@papiel.fr"},{"name":"quentin01","email":"quentin.buathier@epitech.eu"},{"name":"saveman71","email":"antoine.bolvy@gmail.com"}],"directories":{},"publish_time":1412331217096,"_cnpm_publish_time":1412331217096,"_hasShrinkwrap":false},"1.0.0":{"name":"restify-logger","version":"1.0.0","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"],"author":{"name":"Quentin Buathier","email":"quentin.buathier@epitech.eu"},"license":"MIT","bugs":{"url":"https://github.com/AnyFetch/restify-logger/issues"},"homepage":"https://github.com/AnyFetch/restify-logger","dependencies":{"morgan":"^1.3.2"},"gitHead":"27c730b232f9b0bcb68f32781e866ebc07716d18","_id":"restify-logger@1.0.0","_shasum":"b0276dd216ce9314d11c9cb0afe59e4eae1fd8fa","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"quentin01","email":"quentin.buathier@epitech.eu"},"maintainers":[{"name":"matthieu.bacconnier","email":"matthieu.bacconnier@papiel.fr"},{"name":"quentin01","email":"quentin.buathier@epitech.eu"},{"name":"saveman71","email":"antoine.bolvy@gmail.com"}],"dist":{"shasum":"b0276dd216ce9314d11c9cb0afe59e4eae1fd8fa","size":1913,"noattachment":false,"key":"/restify-logger/-/restify-logger-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/restify-logger/download/restify-logger-1.0.0.tgz"},"directories":{},"publish_time":1412265819947,"_cnpm_publish_time":1412265819947,"_hasShrinkwrap":false}},"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","_attachments":{},"homepage":"https://github.com/AnyFetch/restify-logger","bugs":{"url":"https://github.com/AnyFetch/restify-logger/issues"},"license":"MIT"}