You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I am developing an app in Next.js and I started adopting this library because I like the way it handles the LOG_LEVELES.
In my project i just created a file logger.ts and added the js-logger export like so:
import logger from "@/lib/logger";
logger.log("Hello!");
This works perfectly but I would like to know if we can use it like console.log wirhout importing it in every file. And since I use it to log stuff on server-side and client side (Browser) It should work on both.
I achieved this on client side but on server-side is not working... Is there a way to achieve this? wrap somehow the js-logger library and use it on server side and client side (browser) without importing logger on each file?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello!
I am developing an app in Next.js and I started adopting this library because I like the way it handles the LOG_LEVELES.
In my project i just created a file logger.ts and added the js-logger export like so:
so in my code I can use it like this:
This works perfectly but I would like to know if we can use it like console.log wirhout importing it in every file. And since I use it to log stuff on server-side and client side (Browser) It should work on both.
I achieved this on client side but on server-side is not working... Is there a way to achieve this? wrap somehow the js-logger library and use it on server side and client side (browser) without importing logger on each file?
Thanks!
The text was updated successfully, but these errors were encountered: