Skip to content

Commit

Permalink
chore(logger): PowertoolsLogFormatter docstring and variable naming u…
Browse files Browse the repository at this point in the history
…pdate (#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
  • Loading branch information
erikayao93 authored and dreamorosi committed Sep 27, 2023
1 parent 76353a1 commit 0f63b70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/logger/src/formatter/PowertoolsLogFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PowertoolsLogFormatter extends LogFormatter {
*
* @param {UnformattedAttributes} attributes
* @param {LogAttributes} additionalLogAttributes
* @returns {PowertoolsLog}
* @returns {LogItem}
*/
public formatAttributes(
attributes: UnformattedAttributes,
Expand All @@ -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;
}
}

Expand Down

0 comments on commit 0f63b70

Please sign in to comment.