Skip to content

Commit

Permalink
fix: logger message string since effect v3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
floydspace committed Aug 12, 2024
1 parent 52def39 commit 840fc92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tricky-peas-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-aws/powertools-logger": patch
---

fix logger message string since effect v3.5
6 changes: 5 additions & 1 deletion packages/powertools-logger/src/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ const makeLoggerInstance = (logger: Logger) => {
unsafeLogger.logLevelThresholds[
options.logLevel.label === "FATAL" ? "CRITICAL" : options.logLevel.label
],
options.message,
!Array.isArray(options.message)
? options.message
: options.message.length === 1 // since v3.5 the message is always an array
? options.message[0]
: options.message,
extraInputs,
);
});
Expand Down

0 comments on commit 840fc92

Please sign in to comment.