{"_id":"@aurelle/nestjs-http-logger","_rev":"3-4c651be4be9e60f07259d44ebef2cb81","name":"@aurelle/nestjs-http-logger","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@aurelle/nestjs-http-logger","version":"0.0.1","description":"Logs all requests and responses the API handles, with optional details provided in error scenarios.","private":false,"main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","scripts":{"build-only":"ts-node ./scripts/build.ts","emit-types":"tsc --outDir ./dist --declaration  --emitDeclarationOnly","build":"rimraf ./dist && run-p emit-types build-only","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","safe-build":"run-s lint build","publish":"run-s safe-build"},"keywords":[],"author":{"name":"Aurélien Brabant","email":"contact@aurelienbrabant.fr"},"license":"ISC","peerDependencies":{"@nestjs/common":">=8.0.0"},"devDependencies":{"@nestjs/core":"^8.4.7","@types/bytes":"^3.1.1","@types/express":"^4.17.15","@types/node":"^18.11.18","@typescript-eslint/eslint-plugin":"^5.48.2","@typescript-eslint/parser":"^5.48.2","colors":"^1.4.0","esbuild":"^0.17.0","eslint":"^8.32.0","eslint-config-prettier":"^8.6.0","eslint-plugin-prettier":"^4.2.1","npm-run-all":"^4.1.5","prettier":"^2.8.3","rimraf":"^4.0.7","ts-node":"^10.9.1","typescript":"^4.9.4","husky":"^8.0.0"},"dependencies":{"bytes":"^3.1.2"},"gitHead":"98d95b78b8e33fe3f4a361f0444e2cc2853b4ed2","_id":"@aurelle/nestjs-http-logger@0.0.1","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-X51KYP64KwW0srz3qeuK7Tt+D4+KbSy/rLLCdmuROUBZ95b0bfWwYkHxeMMZXfbRMVzLmFrVE2NA5kMShxmbcw==","shasum":"59f5974c9db74d1b7c1d03421376a153bb571afc","tarball":"https://registry.npmjs.org/@aurelle/nestjs-http-logger/-/nestjs-http-logger-0.0.1.tgz","fileCount":21,"unpackedSize":110869,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDElj+/1hMNDp2NhG63T/YWeWdNAV4HfGhLpXOfWrqgugIhAPoLTwIXgUkekAHqpnfOnpDBtpBATxDgYvE3+xCyEPFn"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzZW9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpcdA//RuovENrai7/Lo/eFuaiLd03W+WAzRIr7T0grQmUaks3GeJyb\r\nDzhPMcn4m8ANZrix3RdZqmtyzEk+UekG9XCNaRqOtgYYdaxenyNQKuRH2SuQ\r\njzAZFzr04q7Lqlz7nf/u0EeIREuDFr68l4KGObrcyc/FyHLTkOqoxseSyM5a\r\nRUNOWu6AaZHm/9mcropoyIzO8huQQPEwiLh2GmVPm1A9ChmNH0vFxnt/IQop\r\nemLltfwl/jF7/O59cUQfx4Tbt2aR8Ni4R/ETBwq2EnMJHmAlv5fiH6cIis7n\r\n8twDGjFNVBsxC1FIP2/RuiHayFs8D+FLi2SLnwC9txF1xueRoKuPAc951qzl\r\nfGg0VL1iDGfzztTEl9dN0Iqxwz0Xf5+lVdoo+RbMIkFeO3XoXeWYKvbCEtt3\r\nBiHeM6iqga5s9eaCNvnexvyhFwWzey76p9WkFZESZ+bm4XKThVpyp9Mb+ZfT\r\nwDFsBthoqCVNM7iK8EEVfdMW2fa69C3sdNmG/hCcFg/3dh96IWdSrobbGWtM\r\n+eTg0lcaaSLlHAOZPyuOMUYvdrDXt4lWszCErI9aqMljBGMHKkEhoRKXIh+L\r\nKCq29PiYbHGp16V81qNM/KDpr3NW4w90H5OwuKHjgk/sf1Cu3uqq56iss/MW\r\nFNOpKi48hmqgkRSdlT2Eq/lenH/LyZgd4Mo=\r\n=l98d\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aurelle","email":"main@aurelienbrabant.fr"},"directories":{},"maintainers":[{"name":"aurelle","email":"main@aurelienbrabant.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-http-logger_0.0.1_1674417597125_0.5757376276564632"},"_hasShrinkwrap":false},"0.0.2":{"name":"@aurelle/nestjs-http-logger","version":"0.0.2","description":"Logs all requests and responses the API handles, with optional details provided in error scenarios.","private":false,"main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","scripts":{"build-only":"ts-node ./scripts/build.ts","emit-types":"tsc --outDir ./dist --declaration  --emitDeclarationOnly","build":"rimraf ./dist && run-p emit-types build-only","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","safe-build":"run-s lint build","publish":"run-s safe-build"},"keywords":[],"author":{"name":"Aurélien Brabant","email":"contact@aurelienbrabant.fr"},"license":"ISC","peerDependencies":{"@nestjs/common":">=8.0.0"},"devDependencies":{"@nestjs/core":"^8.4.7","@types/bytes":"^3.1.1","@types/express":"^4.17.15","@types/node":"^18.11.18","@typescript-eslint/eslint-plugin":"^5.48.2","@typescript-eslint/parser":"^5.48.2","colors":"^1.4.0","esbuild":"^0.17.0","eslint":"^8.32.0","eslint-config-prettier":"^8.6.0","eslint-plugin-prettier":"^4.2.1","npm-run-all":"^4.1.5","prettier":"^2.8.3","rimraf":"^4.0.7","ts-node":"^10.9.1","typescript":"^4.9.4","husky":"^8.0.0"},"dependencies":{"bytes":"^3.1.2"},"gitHead":"658bdb63df7d77366a00dfb94fefc5741d21186c","_id":"@aurelle/nestjs-http-logger@0.0.2","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-eAzZsm8+PDd+HOpddNXdLVySj2sOEk4kxj8gSpzZHBR16zKkqN0RLanPFej5fXl0HV5StqYt+UbZM+oNDsZqqg==","shasum":"6ff2a157fa33c9d5993d09bc0dacf917d7380b72","tarball":"https://registry.npmjs.org/@aurelle/nestjs-http-logger/-/nestjs-http-logger-0.0.2.tgz","fileCount":22,"unpackedSize":111155,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBKsAvwd+GAyNucMgiyzy0SrEjzlLessaav5+oqy4AzgIgGG3W2VrfeiGOtFJEYTPWs8pgTqrzcxrPaI4GI0vB+Ek="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzZv4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrD9w/+NfW4b5tkA9aK1cgirma8STgkGPZO/vTQ6qQIR71HwL/wal3a\r\n6QGLmZcuScB1Upk2XjryMOEdMigmp7/lc743VvvpYKTCWZzyr9o2gYuLqyLK\r\n8SmvYSf8pZVNo0btFUL8kQSr41j8wcTSsKONCaYTK6Lk4nWxGBq+UXnfCu3O\r\n/Tb6BCIw8HqJgk4CunmTW0P4eVmjtLIyKZm4IWI4O3Ykgw5bwgqUPRqyjmQB\r\nLiLkBY3xAGr4SyltBLl0clpMPeYkmJSHT/2EiQWldow7KzPDcwf1LhR7FWr8\r\n8Z7dcYtoZ/zvFeFVgWBGSFVSdhX6I7aAEwk4D5GeEJY6NfrLOXzaAgLa7Wpt\r\nCen+hKGl3uVyJZMGziGGr5oDzy0cKTp0X2dr0LLgP+IGTtaAsEcDXJoLF+iV\r\n+m9SLO4DYwUouCeb55kRq1OJH9J8czdZX4VjuGle+WJuJf0iAIbfhaNqCgm+\r\njvYc+FLEiWJgjwzMeojDKq8fYgw/Mmn4jewuavvFNcKmMi/T3H4EkvgmV2AM\r\n4YJ6M8kmy6/iAy4fdmIYR7fSS7ekd6dK+wSq/Bc40hZsj1c3REq10URJSvSD\r\n4Fn4llRPZ4DceU3Di6IfvVAHuAfN6a17/5f9s9o9+Ll0HyY0m57iGeBGSWpY\r\nWowf75hlRXh2eGYxd6l05rpDLNocA2WFtu8=\r\n=XyD/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aurelle","email":"main@aurelienbrabant.fr"},"directories":{},"maintainers":[{"name":"aurelle","email":"main@aurelienbrabant.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-http-logger_0.0.2_1674419192690_0.9982046056090674"},"_hasShrinkwrap":false},"0.0.3":{"name":"@aurelle/nestjs-http-logger","version":"0.0.3","description":"Logs all requests and responses the API handles, with optional details provided in error scenarios.","private":false,"main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","scripts":{"build-only":"ts-node ./scripts/build.ts","emit-types":"tsc --outDir ./dist --declaration  --emitDeclarationOnly","build":"rimraf ./dist && run-p emit-types build-only","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","safe-build":"run-s lint build","publish":"run-s safe-build"},"keywords":[],"author":{"name":"Aurélien Brabant","email":"contact@aurelienbrabant.fr"},"license":"ISC","peerDependencies":{"@nestjs/common":">=8.0.0"},"devDependencies":{"@nestjs/core":"^8.4.7","@types/bytes":"^3.1.1","@types/express":"^4.17.15","@types/node":"^18.11.18","@typescript-eslint/eslint-plugin":"^5.48.2","@typescript-eslint/parser":"^5.48.2","colors":"^1.4.0","esbuild":"^0.17.0","eslint":"^8.32.0","eslint-config-prettier":"^8.6.0","eslint-plugin-prettier":"^4.2.1","npm-run-all":"^4.1.5","prettier":"^2.8.3","rimraf":"^4.0.7","ts-node":"^10.9.1","typescript":"^4.9.4","husky":"^8.0.0"},"dependencies":{"bytes":"^3.1.2"},"gitHead":"658bdb63df7d77366a00dfb94fefc5741d21186c","_id":"@aurelle/nestjs-http-logger@0.0.3","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-fJ9laFIaUrxQDO7bPdgL3tD3ki7CI9PxLpw0PDENUaFH75xkb72F+kOIimgX/ELa1w7Qq1V290kbsiFbWYGnOw==","shasum":"f853dcf5da72beeac4c67853d83689a560bb3a9b","tarball":"https://registry.npmjs.org/@aurelle/nestjs-http-logger/-/nestjs-http-logger-0.0.3.tgz","fileCount":22,"unpackedSize":111141,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZZOH1+4p4pRGXOPJLKYo7CLRlWqsqQ131nGA3s4ZE7AiEApn3cImwQ33UXcMYw3GJUtiULDYJahE6TpKbt6F0ruPc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzZ1AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmppBQ/6AwSbWWvI7OeHZ9+zXM6nWnfAi6yyKvIeWVBqvj4gH8UksudI\r\nDIALFA8MZBjANCXBb6L3Zw3J4fydj+LLzvl+FfncBAyafbL5imnjIoVxPcT4\r\nbend7mD2MXwFh8yN66Tn0DMMRX/ut5ACWuFN1CVIeGKEXLMt2ijeu4hgCeDQ\r\ny7jOvoWkDHNr3MJj64dH8Cv/55mjCywHdFVW1IqRuhFEAQvYdrcNM+rB8NZs\r\nkPewmUfw190EPqCDTfFgQe/lDNbHWGpGKwv3iIEnH6Y0e9sl2qy7VmVLBAMp\r\nqbqEk7SH9m1pJcSmMLttWluaHNGgQs4/7sZ6dmLQTSaDpGINZnxE0Nm+t1Oi\r\nMXF5acQ3TawJrR+tzOekKcxg4lvLio4xAIREhHSpv0dC62wdgetEXvyVBh5j\r\nPUAuuJyI0WsCvAE5hSIbLcMsmFe6dtE6z7kaY0RvmoARV989uxsB6XyqbvYn\r\nhRvTjg+ZVd8SV+pKVG9ec89t0ONZaj/7SRW4KCtuVI2hXheO7UUbS956WInd\r\nttCkTrcH6gIu5yfPCsEo7FDrOm/zCdaGONIv2qyLsTfYXR8jL1k9Efo7RYx3\r\nUURxmzPqdSAZLZOZwBXELnIxX6UAHgCYsXw01+2IgSYUlWbNTq21QtQNCscl\r\nnuWtzLWir2iBnJ3wlHHMfVJXMgipSbHz34I=\r\n=/zTQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aurelle","email":"main@aurelienbrabant.fr"},"directories":{},"maintainers":[{"name":"aurelle","email":"main@aurelienbrabant.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-http-logger_0.0.3_1674419519830_0.341992473706098"},"_hasShrinkwrap":false},"0.0.4":{"name":"@aurelle/nestjs-http-logger","version":"0.0.4","description":"Logs all requests and responses the API handles, with optional details provided in error scenarios.","private":false,"main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","scripts":{"build-only":"ts-node ./scripts/build.ts","emit-types":"tsc --outDir ./dist --declaration  --emitDeclarationOnly","build":"rimraf ./dist && run-p emit-types build-only","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","safe-build":"run-s lint build","publish":"run-s safe-build"},"keywords":[],"author":{"name":"Aurélien Brabant","email":"contact@aurelienbrabant.fr"},"license":"ISC","peerDependencies":{"@nestjs/common":">=8.0.0"},"devDependencies":{"@nestjs/core":"^8.4.7","@types/bytes":"^3.1.1","@types/express":"^4.17.15","@types/node":"^18.11.18","@typescript-eslint/eslint-plugin":"^5.48.2","@typescript-eslint/parser":"^5.48.2","colors":"^1.4.0","esbuild":"^0.17.0","eslint":"^8.32.0","eslint-config-prettier":"^8.6.0","eslint-plugin-prettier":"^4.2.1","npm-run-all":"^4.1.5","prettier":"^2.8.3","rimraf":"^4.0.7","ts-node":"^10.9.1","typescript":"^4.9.4","husky":"^8.0.0"},"dependencies":{"bytes":"^3.1.2"},"gitHead":"c75888795864fea867f15ba3f08cd0568c4361a4","_id":"@aurelle/nestjs-http-logger@0.0.4","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-cw9h1NR+kY5yU/JTrSGer+ZWg6J0uOALBRXoCESY1iTeMRYj6SYcKyZRfuT9m0J58ssoXMayztKs4bM8sFt55Q==","shasum":"5fc27d8a6a98451e9207e5675bde80570c73e07c","tarball":"https://registry.npmjs.org/@aurelle/nestjs-http-logger/-/nestjs-http-logger-0.0.4.tgz","fileCount":22,"unpackedSize":111115,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBr2KtH1X/nsJOcGfG9ItUd0CLa1zdiKAA786G/ddbckAiEAiikW5kDUyg0L6Ra7go+DWG8SjVGku6MKqUDxKgetF1g="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5m52ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr90A//VUkDVAnuRgbpwPifVsbcnngx9XsB+FrBGvQSlrVN6A8+YHzX\r\nKTwZRprXEcmdJ4bI2Le4bczun/Pu8M4Z4WeRAfybER8is0t7PDRzlIXJC4V8\r\nQAbUPxbNeGej8mhVnxet7HTf7S5hpPEgaMh9nLQklmVobLM7+xjs0guESygG\r\nEBnDE+Bo1dzuVKwymbEN76VtIGFveU39YW8dyQ2xAivpibpqPDhpsXykZZPy\r\nX5cv2SR9K0VAxObJTnEjxXrpuyDXdp7cHgPxy+SJTWh+/TVa2wbtzv6J9MKY\r\n612eIWPCtuHDvpevfoiY2eUchsGhtM6MJf1j++9G6ziepaO1NC49PNNyyZTV\r\nEgHdmvrjLDVZtPeXQH71AaIUYq8+PvaseuWMQPc1Dj5cHns2j+t4aopf++Y6\r\nE5WU2AM5Vz3vApxfLyeN37lAUg4MXurK5lBb4NvL+qAAy01CR+MUWn4XMktG\r\n76xvc52gZNgAQUL98PDv/d+rlSRrVJtZRqqk83vq3pWRTpLm6Xe9zi7K7ay0\r\nI9+Ljrxtzad/H1bNrpiUjrZZjc1E6lZKG8i4bW2J7EDc+YT/icMl/U6Owuno\r\nfwfnsjSFpVFxoWyEN4BT2pmB/jlEDmwSvBJUjHKw9WnbEbEf6OikeiOhk0xM\r\nYPjLYM00GtXkflvwBoDy19KaYWYZp5N2y8s=\r\n=BURc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aurelle","email":"main@aurelienbrabant.fr"},"directories":{},"maintainers":[{"name":"aurelle","email":"main@aurelienbrabant.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-http-logger_0.0.4_1676045942264_0.93474201630861"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-22T19:59:57.065Z","0.0.1":"2023-01-22T19:59:57.312Z","modified":"2023-02-10T16:19:02.567Z","0.0.2":"2023-01-22T20:26:32.843Z","0.0.3":"2023-01-22T20:31:59.991Z","0.0.4":"2023-02-10T16:19:02.491Z"},"maintainers":[{"name":"aurelle","email":"main@aurelienbrabant.fr"}],"description":"Logs all requests and responses the API handles, with optional details provided in error scenarios.","keywords":[],"author":{"name":"Aurélien Brabant","email":"contact@aurelienbrabant.fr"},"license":"ISC","readme":"# nestjs-http-logger\n\nA simple NestJS module that logs incoming requests and responses, including a configurable amount of details.\nOn error, it can log the payload that is sent to the client in the console to make debugging easier.\n\n## Building the package\n\n\n```shell\nnpm run build \n```\n## Utilisation\n\nSimply register the `HttpLoggerModule` that is exported by this package, passing it the desired configuration:\n\n```typescript\n/* ... */\nimport { HttpLoggerModule } from '@aurelle/nestjs-http-logger';\n\n@Module({\n  imports: [\n    HttpLoggerModule.forRoot({\n      enableRequestDiscriminator: true,\n      sensitiveQueryParams: ['apiKey', 'userToken'],\n      shouldLogErrorPayload: true,\n      logIpAddress: false,\n      printConfigOnApplicationStartup: true,\n    }),\n  ],\n  controllers: [AppController],\n  providers: [AppService],\n})\nexport class AppModule {}\n```\n\nNote that none of the options listed above is mandatory.\nSane defaults are provided out of the box, so that you can import the module without having to deal with configuration at all.\n\nThe list of all the available options is described by the `HttpLoggerConfig` interface.\nHere are the defaults:\n\n```typescript\nconst defaultConfig: HttpLoggerConfig = {\n    sensitiveQueryParams: ['apiKey', 'userToken'],\n    enableRequestDiscriminator: false,\n    isSensitiveQueryParamCaseSensitive: true,\n    logHttpHost: true,\n    logIpAddress: true,\n    shouldLogErrorPayload: true,\n    loggedErrorPayloadMaxSize: '10KB',\n    printConfigOnApplicationStartup: false,\n    isEnabled: true,\n}\n```\n\n## Async module registration\n\nYou can use the static method `HttpModuleLogger.forRootAsync` to initialize the configuration asynchronously using Nest's DI system.\nFor example:\n\n```typescript\n/* ... */\nimport { ConfigModule, ConfigService } from '@nestjs/config';\nimport { HttpLoggerModule } from '@aurelle/nestjs-http-logger';\n\n@Module({\n  imports: [\n    ConfigModule.forRoot({\n      isGlobal: true,\n    }),\n    HttpLoggerModule.forRootAsync({\n      inject: [ConfigService],\n      useFactory: (configService: ConfigService) => {\n        return {\n          isEnabled: configService.get<string>('ENABLE_HTTP_LOGGER') === 'true',\n          logIpAddress: true,\n          printConfigOnApplicationStartup: true,\n        };\n      },\n    }),\n    ConfigModule,\n  ],\n  controllers: [AppController],\n  providers: [AppService],\n})\nexport class AppModule {}\n```","readmeFilename":"README.md"}