Using pino logger with sveltekit #7663
-
|
According to pino docs https://github.com/pinojs/pino/blob/master/docs/bundling.md
What is the right way how to include them in sveltekit build? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
|
Just passed by here as I look for the same answer. It seems to work out of the box, tried both node and the static adapter with no problems |
Beta Was this translation helpful? Give feedback.
-
|
I was eventually able to get I also use You may also need to add this for |
Beta Was this translation helpful? Give feedback.
-
|
I just tried @zuk's suggestion and it started working.. but then I removed @zuk's suggestion and looks like it's not needed anymore with these packages: |
Beta Was this translation helpful? Give feedback.
-
|
Pino runs fine in dev and preview mode using vite but bombs in production using node. @sveltejs/adapter-auto": "^3.0.0", Node.js v20.11.1 |
Beta Was this translation helpful? Give feedback.
I managed to get it working in prod in a NodeJS environment by following this link Medium Link.
I made some minor modifications but the code has been solid for the last 2 years.
Example output - showing it works for us.