Skip to content

Commit

Permalink
fix(error): log trace instead of only the message (#1863)
Browse files Browse the repository at this point in the history
  • Loading branch information
astahmer authored Dec 22, 2023
1 parent d30b173 commit bd552b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tall-dryers-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@pandacss/logger': patch
---

Log stacktrace on error instead of only logging the message
2 changes: 1 addition & 1 deletion packages/logger/src/format-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ export const formatEntry = (entry: Entry) =>
)

export const createEntry = (level: LogLevel | null, type: string, data: any) => {
const msg = data instanceof Error ? colors.red(data.message) : data
const msg = data instanceof Error ? colors.red(data.stack ?? data.message) : data
return { type, level, msg }
}

3 comments on commit bd552b1

@vercel
Copy link

@vercel vercel bot commented on bd552b1 Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

panda-docs – ./website

panda-docs-git-main-chakra-ui.vercel.app
panda-docs.vercel.app
panda-css.com
panda-docs-chakra-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on bd552b1 Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

panda-studio – ./

panda-app.vercel.app
panda-studio-git-main-chakra-ui.vercel.app
panda-studio-chakra-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on bd552b1 Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.