-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
feat(config): add logLevel option to suppress ionic warnings and errors #30015
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Can we put this against a feature branch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM 👍
Nit:
I would maybe create an enum for log levels, e.g.:
const enum LogLevel {
INFO = 'INFO',
ERROR = 'ERROR',
WARN = 'WARN'
}
So renaming the log levels or enhancing them will be easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue number: resolves #29814
What is the current behavior?
Developers may receive Ionic warnings and errors in their console, logs and CI runs (for tests). Currently there is not a mechanism for developers to opt-out of these logs in situations where they are intentionally configuring Ionic in a way to produce a warning.
What is the new behavior?
logLevel
in the Ionic config to control the log level that Ionic will produce logs for.OFF
will completely disable all warnings and errors from IonicWARN
will log warnings and errorsERROR
will log only errorsprintIonWarning
andprintIonError
Does this introduce a breaking change?
Other information
This feature, if accepted, should be targeted to a minor release.