From 10ee2cacc9666e38e8debad3f15b3d933b7056f5 Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Thu, 16 May 2024 14:46:34 +0300 Subject: [PATCH] fix(application-generic): Exclude health-checks from logs --- packages/application-generic/src/logging/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/application-generic/src/logging/index.ts b/packages/application-generic/src/logging/index.ts index a5d43a5d55e..234e2af5b29 100644 --- a/packages/application-generic/src/logging/index.ts +++ b/packages/application-generic/src/logging/index.ts @@ -1,4 +1,4 @@ -import { NestInterceptor } from '@nestjs/common'; +import { NestInterceptor, RequestMethod } from '@nestjs/common'; import { LoggerErrorInterceptor, Logger, @@ -108,6 +108,7 @@ export function createNestLoggingModuleOptions( ); return { + exclude: [{ path: '*/health-check', method: RequestMethod.GET }], pinoHttp: { customLevels: loggingLevelSet, level: values.level,