-
-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add conditional logging #51
Comments
This would be really useful, I came looking for just something like that. I'd love an option to specify different verbosity levels and run my script with different loggers enabled. For example node index.js -v # enables all loggers, except debug/trace
node index.js -vv # enables all loggers In code you could do something like this: // 2 could be the default level. 0 = no logging
logger.setVerbosity(2);
// or set it in options
const option = {
verbosity: 2
};
// and specify verbosity requirement for each logger to be activated
const option = {
debug: {
verbosity: 2,
}
}; |
Yep this is definitely needed, the feature will land on the upcoming release : ) |
+1 to this feature request |
I can't get this to work to override through |
Please 🙏 |
It would be nice to add a property to the custom options that can control logging on a certain condition
Example
The text was updated successfully, but these errors were encountered: