{"name":"koa-logger","description":"Logging middleware for koa","version":"4.0.0","main":"index.js","scripts":{"lint":"xo","lint:fix":"xo --fix","test":"node --test","precoverage":"rimraf .nyc_output coverage","test-ci":"c8 npm run test"},"repository":{"type":"git","url":"https://github.com/koajs/logger"},"keywords":["koa","middleware","logger","log"],"author":{"name":"Christoffer Hallas","email":"christoffer.hallas@icloud.com"},"contributors":[{"name":"Imed Jaberi","email":"imed-jebari@outlook.com","url":"https://github.com/3imed-jaberi"}],"license":"MIT","dependencies":{"bytes":"^3.1.0","chalk":"^4.1.2","humanize-number":"^0.0.2","on-finished":"^2.4.1","passthrough-counter":"^1.0.0"},"devDependencies":{"boom":"^7.3.0","c8":"^10.1.3","eslint-config-xo-lass":"^2.0.1","koa":"^3.0.0","koa-compress":"^5.1.1","koa-route":"^4.0.1","sinon":"^20.0.0","supertest":"^7.1.1","xo":"^0.60.0"},"engines":{"node":">= 18"},"homepage":"https://github.com/koajs/logger","bugs":{"url":"https://github.com/koajs/logger/issues"},"licenseText":"MIT License\n\nCopyright (c) 2020 Koa.js contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"koa-logger@4.0.0","dist":{"shasum":"1e6db231c3b2409c0a3e78953680b580a1d2491b","integrity":"sha512-LP3ocZPpSINyw2LBSIOpHksrYTlr5DKRB9ogk2PFEsF6vZJE2G//0TsjmL7Ph0O/KI4QU/yZJpRC5BelR+2oJA==","tarball":"http://registry-npm.ywwl.com/koa-logger/download/koa-logger-4.0.0.tgz","fileCount":6,"unpackedSize":9094,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCPd8oWX+HITZkHNQmX+Bmkb23Bw6uW1F4Pq6rP5v+a8AIhAJtZ1S1pWk5fxDGa7DiRxU6JjE9Jc7VdfQ5sKjeR15OU"}],"size":4017,"noattachment":false,"key":"/koa-logger/-/koa-logger-4.0.0.tgz"},"_npmUser":{"name":"3imed-jaberi","email":"imed_jebari@hotmail.fr"},"directories":{},"maintainers":[{"name":"coderhaoxin","email":"haoxinst@gmail.com"},{"name":"niftylettuce","email":"niftylettuce@gmail.com"},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"3imed-jaberi","email":"imed_jebari@hotmail.fr"},{"name":"titanism","email":"npm@titanism.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/koa-logger_4.0.0_1749775491645_0.3072969289201124"},"_hasShrinkwrap":false,"readme":"\n# koa-logger\n\n[![npm version][npm-image]][npm-url]\n\n Development style logger middleware for [koa](https://github.com/koajs/koa). Compatible with [request-received](https://github.com/cabinjs/request-received).\n\n```\n<-- GET /\n--> GET / 200 835ms 746b\n<-- GET /\n--> GET / 200 960ms 1.9kb\n<-- GET /users\n--> GET /users 200 357ms 922b\n<-- GET /users?page=2\n--> GET /users?page=2 200 466ms 4.66kb\n```\n\n## Installation\n\n```js\n$ npm install koa-logger\n```\n\n## Example\n\n```js\nconst logger = require('koa-logger')\nconst Koa = require('koa')\n\nconst app = new Koa()\napp.use(logger())\n```\n\n## Notes\n\n  Recommended that you `.use()` this middleware near the top\n  to \"wrap\" all subsequent middleware.\n\n## Use Custom Transporter\n\n```js\nconst logger = require('koa-logger')\nconst Koa = require('koa')\n\nconst app = new Koa()\napp.use(logger((str, args) => {\n  // redirect koa logger to other output pipe\n  // default is process.stdout(by console.log function)\n}))\n```\nor\n```js\napp.use(logger({\n  transporter: (str, args) => {\n    // ...\n  }\n}))\n```\n\n  Param `str` is output string with ANSI Color, and you can get pure text with other modules like `strip-ansi`  \n  Param `args` is a array by `[format, method, url, status, time, length]`\n\n## License\n\n  MIT\n\n[npm-image]: https://img.shields.io/npm/v/koa-logger.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/koa-logger\n","publish_time":1749775491813,"_cnpm_publish_time":1749775491813,"dist-tags":{"latest":"4.0.0","next":"2.0.1"}}