From ed05ea553f605234cd8803e633f3c07429877dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Thu, 16 Nov 2023 12:57:01 +0100 Subject: [PATCH] fix(api-gateway): remove overly verbose debug messages --- .../api-gateway/src/Service/Http/HttpServiceProxy.ts | 11 ----------- .../api-gateway/src/Service/gRPC/GRPCServiceProxy.ts | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/packages/api-gateway/src/Service/Http/HttpServiceProxy.ts b/packages/api-gateway/src/Service/Http/HttpServiceProxy.ts index b5d914b40..6f850a389 100644 --- a/packages/api-gateway/src/Service/Http/HttpServiceProxy.ts +++ b/packages/api-gateway/src/Service/Http/HttpServiceProxy.ts @@ -144,9 +144,6 @@ export class HttpServiceProxy implements ServiceProxyInterface { } const isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat = request.headers.connectionid !== undefined - this.logger.debug( - `Calling websockets service: ${endpointOrMethodIdentifier}. Format is minimal: ${isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat}`, - ) if (isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat) { await this.callServerWithLegacyFormat( this.webSocketServerUrl, @@ -215,11 +212,6 @@ export class HttpServiceProxy implements ServiceProxyInterface { headers['X-Auth-Offline-Token'] = response.locals.offlineAuthToken } - this.logger.debug(`Calling [${request.method}] ${serverUrl}/${endpointOrMethodIdentifier}, - headers: ${JSON.stringify(headers)}, - query: ${JSON.stringify(request.query)}, - payload: ${JSON.stringify(payload)}`) - const serviceResponse = await this.httpClient.request({ method: request.method as Method, headers, @@ -318,9 +310,6 @@ export class HttpServiceProxy implements ServiceProxyInterface { payload, ) - this.logger.debug(`Response from underlying server: ${JSON.stringify(serviceResponse?.data)}, - headers: ${JSON.stringify(serviceResponse?.headers)}`) - if (!serviceResponse) { return } diff --git a/packages/api-gateway/src/Service/gRPC/GRPCServiceProxy.ts b/packages/api-gateway/src/Service/gRPC/GRPCServiceProxy.ts index d7161b214..ac66adcbe 100644 --- a/packages/api-gateway/src/Service/gRPC/GRPCServiceProxy.ts +++ b/packages/api-gateway/src/Service/gRPC/GRPCServiceProxy.ts @@ -155,9 +155,6 @@ export class GRPCServiceProxy implements ServiceProxyInterface { } const isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat = request.headers.connectionid !== undefined - this.logger.debug( - `Calling websockets service: ${endpointOrMethodIdentifier}. Format is minimal: ${isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat}`, - ) if (isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat) { await this.callServerWithLegacyFormat( this.webSocketServerUrl, @@ -226,11 +223,6 @@ export class GRPCServiceProxy implements ServiceProxyInterface { headers['X-Auth-Offline-Token'] = response.locals.offlineAuthToken } - this.logger.debug(`Calling [${request.method}] ${serverUrl}/${endpointOrMethodIdentifier}, - headers: ${JSON.stringify(headers)}, - query: ${JSON.stringify(request.query)}, - payload: ${JSON.stringify(payload)}`) - const serviceResponse = await this.httpClient.request({ method: request.method as Method, headers, @@ -329,9 +321,6 @@ export class GRPCServiceProxy implements ServiceProxyInterface { payload, ) - this.logger.debug(`Response from underlying server: ${JSON.stringify(serviceResponse?.data)}, - headers: ${JSON.stringify(serviceResponse?.headers)}`) - if (!serviceResponse) { return }