Skip to content

Commit

Permalink
Fix order of logs attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw committed Nov 21, 2024
1 parent 5448145 commit 795d30c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eighty-brooms-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@saleor/apps-logger": patch
---

Fix Vercel runtime transport logs attribute order - attributes from logs context will be first so log attributes can override them.
2 changes: 1 addition & 1 deletion packages/logger/src/logger-vercel-runtime-transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const attachLoggerVercelRuntimeTransport = (

const stringifiedMessage = JSON.stringify({
message: bodyMessage,
...attributes,
...(loggerContext?.getRawContext() ?? {}),
...attributes,
deployment: {
environment: process.env.ENV,
},
Expand Down

0 comments on commit 795d30c

Please sign in to comment.