axiomhq / next-axiom

The official Next.js library for Axiom.
https://axiom.co/vercel
MIT License
366 stars 29 forks source link

How to print logs locally? #242

Open niyonx opened 1 month ago

niyonx commented 1 month ago

I still want logs to show in terminal locally

adelrodriguez commented 2 weeks ago

In my experience, if you're using Logger manually instead of the Log Drain, you can omit the NEXT_PUBLIC_AXIOM_DATASET and logs will show in local development.

travistylervii commented 2 weeks ago

For dev environments I just print locally and do a NODE_ENV === 'production' conditional.

If prod, send to axiom, else send to console.