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

feat(core): developers can suppress ionic warnings and errors #30015

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sean-perkins
Copy link
Contributor

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?

  • Developers can assign a value to 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 Ionic
    • WARN will log warnings and errors
    • ERROR will log only errors
  • Default behavior is that developers receive both Ionic warnings and errors
  • Configuration only applies to usages of printIonWarning and printIonError

Does this introduce a breaking change?

  • Yes
  • No

Other information

This feature, if accepted, should be targeted to a minor release.

Copy link

vercel bot commented Nov 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 7:20pm

@github-actions github-actions bot added the package: core @ionic/core package label Nov 13, 2024
@sean-perkins sean-perkins marked this pull request as ready for review November 13, 2024 19:12
@sean-perkins sean-perkins requested a review from a team as a code owner November 13, 2024 19:12
@brandyscarney
Copy link
Member

Can we put this against a feature branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Add option to IonicConfig to disable Ionic warning and error logs
3 participants