Skip to content
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

Simplest quite mode implementation for plugin #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imanbee
Copy link

@imanbee imanbee commented Sep 20, 2021

Hi @adamduncan!
First of all, thank you for your plugin! Works great :)
Quiet mode is a need for me, so I'm proposing simplest flag to have an ability to suppress warnings / errors in console.
I know it can be improved as option to choose between warnings and errors or even all output, so please let me know what is your vision regarding this option.

@imanbee imanbee mentioned this pull request Sep 20, 2021
@adamduncan adamduncan linked an issue Oct 7, 2021 that may be closed by this pull request
@adamduncan
Copy link
Owner

Thanks @imanbee 👍

Will put some thought into the API here. quietMode: true certainly does the job, as intended with #15.

I wonder if there's some preexisting logLevel Node convention that might be preferable? 🤔

@imanbee
Copy link
Author

imanbee commented Nov 30, 2021

Usually Node.js uses one of these options to set logLevel : trace/debug/info/warn/error.
If we want to use same convention, that "fallback" locales output should be visible only for logLevel: "warn" and not for `logLevel: "error"'. So I think only these two options might be available at the moment, however in the future you can always extend for any "lower" level of logging

@imanbee
Copy link
Author

imanbee commented Nov 30, 2021

And we can possibly use https://www.npmjs.com/package/loglevel package to control current logLevel and automatically disable logging which has lower level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suppress Warnings
2 participants