From 2ba6ef9bd215582c52c8da0b0185cd07e49260aa Mon Sep 17 00:00:00 2001 From: Eric Zhong Date: Mon, 16 Oct 2023 14:29:25 -0400 Subject: [PATCH] some log cleanups --- lib/handlers/base/api-handler.ts | 2 +- lib/handlers/quote/handler.ts | 1 - lib/util/metrics-pair.ts | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/handlers/base/api-handler.ts b/lib/handlers/base/api-handler.ts index 7a539542..6fec4ff6 100644 --- a/lib/handlers/base/api-handler.ts +++ b/lib/handlers/base/api-handler.ts @@ -113,7 +113,7 @@ export abstract class APIGLambdaHandler< requestId: context.awsRequestId, }); - log.info({ event, context }, 'Request started.'); + log.info({ eventBody: event.body, eventHeaders: event.headers, context }, 'Request started.'); let requestBody: ReqBody; let requestQueryParams: ReqQueryParams; diff --git a/lib/handlers/quote/handler.ts b/lib/handlers/quote/handler.ts index be674676..04d97b56 100644 --- a/lib/handlers/quote/handler.ts +++ b/lib/handlers/quote/handler.ts @@ -278,7 +278,6 @@ export class QuoteHandler extends APIGLambdaHandler< const responseBody = JSON.parse(response.body!); const rawBody = JSON.parse(event.body!); - log.info({ rawBody }, 'rawBody'); if (statusCode != 200 && responseBody.errorCode == ErrorCode.ValidationError) { metrics.putMetric(`QuoteRequestValidationError`, 1); return; diff --git a/lib/util/metrics-pair.ts b/lib/util/metrics-pair.ts index b8e6a0c7..06464257 100644 --- a/lib/util/metrics-pair.ts +++ b/lib/util/metrics-pair.ts @@ -96,7 +96,6 @@ export class MetricPair { private parse(value: string, currency: Currency): CurrencyAmount { const typedValueParsed = parseUnits(value, currency.decimals).toString(); - log.info(`parsed value: ${typedValueParsed}`); return CurrencyAmount.fromRawAmount(currency, typedValueParsed); } } @@ -243,7 +242,6 @@ export const emitUniswapXPairMetricIfTracking = async ( bestQuoteType ); if (emitted) { - log.info(`custom pair tracking metric emitted for ${emitted}`); return; } }