Browse Source

fix(api-gateway): remove overly verbose debug messages

Karol Sójko 1 year ago
parent
commit
ed05ea553f

+ 0 - 11
packages/api-gateway/src/Service/Http/HttpServiceProxy.ts

@@ -144,9 +144,6 @@ export class HttpServiceProxy implements ServiceProxyInterface {
     }
     }
 
 
     const isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat = request.headers.connectionid !== undefined
     const isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat = request.headers.connectionid !== undefined
-    this.logger.debug(
-      `Calling websockets service: ${endpointOrMethodIdentifier}. Format is minimal: ${isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat}`,
-    )
     if (isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat) {
     if (isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat) {
       await this.callServerWithLegacyFormat(
       await this.callServerWithLegacyFormat(
         this.webSocketServerUrl,
         this.webSocketServerUrl,
@@ -215,11 +212,6 @@ export class HttpServiceProxy implements ServiceProxyInterface {
         headers['X-Auth-Offline-Token'] = response.locals.offlineAuthToken
         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({
       const serviceResponse = await this.httpClient.request({
         method: request.method as Method,
         method: request.method as Method,
         headers,
         headers,
@@ -318,9 +310,6 @@ export class HttpServiceProxy implements ServiceProxyInterface {
       payload,
       payload,
     )
     )
 
 
-    this.logger.debug(`Response from underlying server: ${JSON.stringify(serviceResponse?.data)},
-      headers: ${JSON.stringify(serviceResponse?.headers)}`)
-
     if (!serviceResponse) {
     if (!serviceResponse) {
       return
       return
     }
     }

+ 0 - 11
packages/api-gateway/src/Service/gRPC/GRPCServiceProxy.ts

@@ -155,9 +155,6 @@ export class GRPCServiceProxy implements ServiceProxyInterface {
     }
     }
 
 
     const isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat = request.headers.connectionid !== undefined
     const isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat = request.headers.connectionid !== undefined
-    this.logger.debug(
-      `Calling websockets service: ${endpointOrMethodIdentifier}. Format is minimal: ${isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat}`,
-    )
     if (isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat) {
     if (isARequestComingFromApiGatewayAndShouldBeKeptInMinimalFormat) {
       await this.callServerWithLegacyFormat(
       await this.callServerWithLegacyFormat(
         this.webSocketServerUrl,
         this.webSocketServerUrl,
@@ -226,11 +223,6 @@ export class GRPCServiceProxy implements ServiceProxyInterface {
         headers['X-Auth-Offline-Token'] = response.locals.offlineAuthToken
         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({
       const serviceResponse = await this.httpClient.request({
         method: request.method as Method,
         method: request.method as Method,
         headers,
         headers,
@@ -329,9 +321,6 @@ export class GRPCServiceProxy implements ServiceProxyInterface {
       payload,
       payload,
     )
     )
 
 
-    this.logger.debug(`Response from underlying server: ${JSON.stringify(serviceResponse?.data)},
-      headers: ${JSON.stringify(serviceResponse?.headers)}`)
-
     if (!serviceResponse) {
     if (!serviceResponse) {
       return
       return
     }
     }