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
followed by a whole trace if you add the --trace-warnings flag.
This was fixed in Winston 2.4.5 but they do recommend moving to Winston 3.
That said, shipping with a logger is crossing concerns...
Libraries shouldn't have baked in loggers, but they can have interface to configure your own logger. for example you can pass a log function handler
importcomedyfrom'comedy';comedy.setLogger((category,level, ...msg)=>{/*handle however I want*/});// or comedy.setLoggerFactory((category)=>(level, ...msg)=>{/* create a logger for each category*/});// then the rest of the usage stays exactly the same.
The text was updated successfully, but these errors were encountered:
as a side note, if you want to still maintain full backwards-compatible behaviour, then you can detect if Winston is already installed and then preconfigure it as the default log handler, otherwise just default to console.
when running the basic getting started example the following error appears:
followed by a whole trace if you add the
--trace-warnings
flag.This was fixed in Winston 2.4.5 but they do recommend moving to Winston 3.
That said, shipping with a logger is crossing concerns...
Libraries shouldn't have baked in loggers, but they can have interface to configure your own logger. for example you can pass a log function handler
The text was updated successfully, but these errors were encountered: