{"id":13598741,"url":"https://github.com/mentos1386/nest-morgan","last_synced_at":"2025-04-10T09:32:05.977Z","repository":{"id":53967661,"uuid":"140972391","full_name":"mentos1386/nest-morgan","owner":"mentos1386","description":"Morgan Logger for Nestjs","archived":true,"fork":false,"pushed_at":"2021-07-08T09:50:59.000Z","size":309,"stargazers_count":19,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T08:50:11.076Z","etag":null,"topics":["logging","morgan","nest","nest-module","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/mentos1386.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":"2018-07-14T19:25:05.000Z","updated_at":"2023-01-28T07:54:06.000Z","dependencies_parsed_at":"2022-08-13T05:20:51.821Z","dependency_job_id":null,"html_url":"https://github.com/mentos1386/nest-morgan","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mentos1386%2Fnest-morgan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mentos1386%2Fnest-morgan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mentos1386%2Fnest-morgan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mentos1386%2Fnest-morgan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mentos1386","download_url":"https://codeload.github.com/mentos1386/nest-morgan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248191772,"owners_count":21062569,"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":["logging","morgan","nest","nest-module","typescript"],"created_at":"2024-08-01T17:00:55.666Z","updated_at":"2025-04-10T09:32:00.958Z","avatar_url":"https://github.com/mentos1386.png","language":"TypeScript","funding_links":[],"categories":["Components \u0026 Libraries","资源"],"sub_categories":["组件和库"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"http://kamilmysliwiec.com/public/nest-logo.png#1\" alt=\"Nest Logo\" /\u003e   \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eMorgan Module for Nest framework\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/nest-morgan\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/nest-morgan.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/nest-morgan\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/nest-morgan.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/nest-morgan\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/nest-morgan.svg\" alt=\"NPM Downloads\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/mentos1386/nest-morgan/actions/workflows/test.yaml\"\u003e\u003cimg src=\"https://github.com/mentos1386/nest-morgan/actions/workflows/test.yaml/badge.svg?branch=master\" alt=\"Github Actions - Test\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n### NOT MAINTAINED!\n\nHey all. **This project is not maintained and archived.** You should check out [iamolegga/nestjs-pino](https://github.com/iamolegga/nestjs-pino) which is maintained\nand with a bunch of cool features.\n\n## Description\n\nThis's a [Morgan](https://github.com/expressjs/morgan) module for [Nest](https://github.com/nestjs/nest).\n\n## Installation\n\n```bash\n$ npm i --save nest-morgan morgan @types/morgan\n```\n\n### Versions\n\n- **2.x** Is for Nest v7.x\n  - Remove the need to use `MorganModule.forRoot()` [#17](https://github.com/mentos1386/nest-morgan/issues/17).\n- **1.x** Is for Nest v6.x\n- **0.x** Is for Nest v5.x\n\n## Quick Start\n\n### Include Module\n\n\u003e app.module.ts\n\n```ts\n@Module({\n  imports: [MorganModule],\n})\nexport class ApplicationModule {}\n```\n\n#### Global\n\nIf you want to set up interceptor as global, you have to follow Nest\ninstructions [here](https://docs.nestjs.com/interceptors). Something like\nthis:\n\n\u003e app.module.ts\n\n```ts\nimport { Module } from \"@nestjs/common\";\nimport { APP_INTERCEPTOR } from \"@nestjs/core\";\nimport { MorganModule, MorganInterceptor } from \"nest-morgan\";\n\n@Module({\n  imports: [MorganModule],\n  providers: [\n    {\n      provide: APP_INTERCEPTOR,\n      useClass: MorganInterceptor(\"combined\"),\n    },\n  ],\n})\nexport class ApplicationModule {}\n```\n\n### Using Interceptor\n\n\u003e app.controller.ts\n\n```ts\n  @UseInterceptors(MorganInterceptor('combined'))\n  @Get('/some/route')\n  public async someRoute() {\n    ...\n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmentos1386%2Fnest-morgan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmentos1386%2Fnest-morgan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmentos1386%2Fnest-morgan/lists"}