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
I have implemented Winston to log all of my project
My issue is,
When my app is in development mode it should log all info, warnings, errors etc.. and when my app is in production mode it should log only warnings and errors. I tried the below code when my app is in production mode, and tried to log info it gives me error.
When try to log this Logger.info({ message: "This is info" }); it gives me below error
Logger.info is undefined
What version of Winston presents the issue?
3.13.0
What version of Node are you using?
v18.17.1
If this worked in a previous version of Winston, which was it?
I think the issue is in production mode, I didn't register the info level for that reason it gives me an error.
But I want to log info only in development mode. What should be best approach for this?
The text was updated successfully, but these errors were encountered:
🔎 Search Terms
winston logs info only in development mode
The problem
I have implemented Winston to log all of my project
My issue is,
When my app is in
development
mode it should log all info, warnings, errors etc.. and when my app is inproduction
mode it should log only warnings and errors. I tried the below code when my app is in production mode, and tried to log info it gives me error.When try to log this
Logger.info({ message: "This is info" });
it gives me below errorLogger.info is undefined
What version of Winston presents the issue?
3.13.0
What version of Node are you using?
v18.17.1
If this worked in a previous version of Winston, which was it?
No response
Minimum Working Example
Additional information
I think the issue is in production mode, I didn't register the info level for that reason it gives me an error.
But I want to log info only in development mode. What should be best approach for this?
The text was updated successfully, but these errors were encountered: