{"id":22300760,"url":"https://github.com/tsui66/egg-mongoose-logger","last_synced_at":"2025-07-29T02:32:04.683Z","repository":{"id":57220597,"uuid":"99592007","full_name":"tsui66/egg-mongoose-logger","owner":"tsui66","description":":egg:A helper plugin to hook egg logger library in mongoose. ","archived":false,"fork":false,"pushed_at":"2017-08-17T11:29:12.000Z","size":60,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-05T18:24:54.479Z","etag":null,"topics":["eggjs","mongoose","mongoose-logger","nodejs","plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsui66.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-07T15:21:54.000Z","updated_at":"2022-05-26T10:05:55.000Z","dependencies_parsed_at":"2022-08-29T04:01:33.932Z","dependency_job_id":null,"html_url":"https://github.com/tsui66/egg-mongoose-logger","commit_stats":null,"previous_names":["quinton/egg-mongoose-logger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsui66%2Fegg-mongoose-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsui66%2Fegg-mongoose-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsui66%2Fegg-mongoose-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsui66%2Fegg-mongoose-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsui66","download_url":"https://codeload.github.com/tsui66/egg-mongoose-logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227971922,"owners_count":17849421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eggjs","mongoose","mongoose-logger","nodejs","plugin"],"created_at":"2024-12-03T18:13:51.065Z","updated_at":"2024-12-03T18:13:51.915Z","avatar_url":"https://github.com/tsui66.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# egg-mongoose-logger\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![David deps][david-image]][david-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/egg-mongoose-logger.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/egg-mongoose-logger\n[travis-image]: https://travis-ci.org/Quinton/egg-mongoose-logger.svg?branch=master\n[travis-url]: https://travis-ci.org/Quinton/egg-mongoose-logger\n[codecov-image]: https://img.shields.io/codecov/c/github/Quinton/egg-mongoose-logger.svg?style=flat-square\n[codecov-url]: https://codecov.io/github/Quinton/egg-mongoose-logger?branch=master\n[david-image]: https://img.shields.io/david/Quinton/egg-mongoose-logger.svg?style=flat-square\n[david-url]: https://david-dm.org/Quinton/egg-mongoose-logger/repo.svg\n[snyk-image]: https://snyk.io/test/npm/egg-mongoose-logger/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/egg-mongoose-logger\n[download-image]: https://img.shields.io/npm/dm/egg-mongoose-logger.svg?style=flat-square\n[download-url]: https://npmjs.org/package/egg-mongoose-logger\n\n\u003c!--\nDescription here.\n--\u003e\n\n## Install\n\n```bash\n$ npm i egg-mongoose-logger --save\n```\n\n## Usage\n\n```js\n// {app_root}/config/plugin.js\nexports.mongooseLogger = {\n  enable: true,\n  package: 'egg-mongoose-logger',\n};\n```\n\n## Configuration\n\n```js\n// {app_root}/config/config.default.js\nexports.mongooseLogger = {\n  debug: true,\n  // custom formatter, optional\n  formatter: function(meta) {\n    const query = JSON.stringify(meta.query);\n    const options = JSON.stringify(meta.options || {});\n    return `db.getCollection('${meta.collectionName}').${meta.methodName}(${query}, ${options})`;\n  },\n};\n```\n\nsee [config/config.default.js](config/config.default.js) for more detail.\n\n## Example\n\n\u003c!-- example here --\u003e\n\n## Questions \u0026 Suggestions\n\nPlease open an issue [here](https://github.com/eggjs/egg/issues).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsui66%2Fegg-mongoose-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsui66%2Fegg-mongoose-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsui66%2Fegg-mongoose-logger/lists"}