Logging both in SSR and client side in SvelteKit routes and components

Viewed 886

What kind of a logging solution could be a good fit in SvelteKit if server-side rendering must be enabled?

  • Configurable logging levels

  • Logs to a file/stdout when server-side rendering is run with Node.js adapter

  • Logs to a console if any logging statements are encountered in client-side processing

  • Log level filters, timestamp, coloring and such features that are useful for dianogtics (otherwise console.log would be sufficient)

I am aware of multiple JavaScript logging solutions like Winston, but I am not sure if they are very good fit for SvelteKit model.

0 Answers
Related