From 8cb05e9a3863374cc1f3279a64ddb054ba7f4d17 Mon Sep 17 00:00:00 2001 From: Erika Yao <71943596+erikayao93@users.noreply.github.com> Date: Fri, 7 Jul 2023 08:58:21 -0500 Subject: [PATCH] chore(logger): PowertoolsLogFormatter docstring and variable naming update (#1585) * Updated formatAttributes for additional parameters and LogItem return type * Updated the unit tests to pass with new formatter * Updated Powertool named objects to Powertools * Updated tests to match new naming consistency * Updated for tests for new naming consistency * Updated formatter for new design decisions * Update Logger for ephemeral attributes * Update bringYourOwnFormatter documentation to match new formatter * Fixed incorrect return type, renamed variable for consistency --- packages/logger/src/formatter/PowertoolsLogFormatter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/logger/src/formatter/PowertoolsLogFormatter.ts b/packages/logger/src/formatter/PowertoolsLogFormatter.ts index 6a599d6eb8..0460ed48a4 100644 --- a/packages/logger/src/formatter/PowertoolsLogFormatter.ts +++ b/packages/logger/src/formatter/PowertoolsLogFormatter.ts @@ -16,7 +16,7 @@ class PowertoolsLogFormatter extends LogFormatter { * * @param {UnformattedAttributes} attributes * @param {LogAttributes} additionalLogAttributes - * @returns {PowertoolsLog} + * @returns {LogItem} */ public formatAttributes( attributes: UnformattedAttributes, @@ -36,11 +36,11 @@ class PowertoolsLogFormatter extends LogFormatter { xray_trace_id: attributes.xRayTraceId, }; - const powertoolLogItem = new LogItem({ attributes: baseAttributes }); + const powertoolsLogItem = new LogItem({ attributes: baseAttributes }); - powertoolLogItem.addAttributes(additionalLogAttributes); + powertoolsLogItem.addAttributes(additionalLogAttributes); - return powertoolLogItem; + return powertoolsLogItem; } }