Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove logging for health check #5481

Merged
merged 8 commits into from
May 15, 2024
6 changes: 3 additions & 3 deletions packages/application-generic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@
"lodash": "^4.17.15",
"mixpanel": "^0.17.0",
"nestjs-otel": "^5.1.5",
"nestjs-pino": "^3.4.0",
"nestjs-pino": "^4.0.0",
"node-fetch": "^3.2.10",
"pino-http": "^8.3.3",
"pino-pretty": "^9.4.0",
"pino-http": "^9.0.0",
"pino-pretty": "^11.0.0",
"recursive-diff": "^1.0.8",
"redlock": "5.0.0-beta.2",
"reflect-metadata": "^0.1.13",
Expand Down
5 changes: 3 additions & 2 deletions packages/application-generic/src/logging/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NestInterceptor } from '@nestjs/common';
import { NestInterceptor, RequestMethod } from '@nestjs/common';
import {
LoggerErrorInterceptor,
Logger,
Expand Down Expand Up @@ -52,7 +52,7 @@ export function getLogLevel() {
return logLevel;
}

// TODO: should be moved into a config framework
// TODO: ENV should be moved into a config framework
function getLoggingVariables(): ILoggingVariables {
const env = process.env.NODE_ENV ?? 'local';

Expand Down Expand Up @@ -108,6 +108,7 @@ export function createNestLoggingModuleOptions(
);

return {
exclude: [{ path: '*/health-check', method: RequestMethod.GET }],
pinoHttp: {
customLevels: loggingLevelSet,
level: values.level,
Expand Down