[Feature Request]: Make level more intuitive #2414
Labels
Feature Request
Request for new functionality to support use cases not already covered
Needs Investigation
🔎 Search Terms
level
The vision
I think it really would be nice to receive some kind of warning into console, if you didn't setup level propery. Like
level is not provided. using default(3)
or when trying to log something wich is higer than max log level set in logger receive warning in console, like
line 21>logger.log('debug', 'Debug log message'); 'trying to log message with level higer than logger's level'
(just once, so you will know it)Use case
I've played a bit with custom levels in winston, and found out that there is param called level in logger wich ruins code in some cases.
It's not mandatory, so I don't expect it to actually influence max log level if not used, but it is set to level 3 by default. I've spent couple of days to figure out why my custom levels didn't work (first thought it's transport issue).
This code woun't work, unless level is provided. No error, no warning, you just won't receive logs.
I think this feature should simplify working with library, make it more intuitive, especially for new customers.
Additional information
No response
The text was updated successfully, but these errors were encountered: