Skip to content

Commit

Permalink
Fix order of logs attributes (#1650)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw authored Nov 22, 2024
1 parent 93c4ab3 commit 1e70b99
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 1e70b99

Please sign in to comment.