Skip to content

fix(many): gate debug logs behind the DEBUG log level - #31342

Open
ShaneK wants to merge 1 commit into
major-9.0from
FW-7658
Open

fix(many): gate debug logs behind the DEBUG log level#31342
ShaneK wants to merge 1 commit into
major-9.0from
FW-7658

Conversation

@ShaneK

@ShaneK ShaneK commented Aug 10, 2026

Copy link
Copy Markdown
Member

Issue number: internal


What is the current behavior?

Currently, StackManager in @ionic/react-router writes six some console logs that most users do not use. They're still useful for debugging issues with routing though if they come up again, so we left them in. However, every user using the stack manger would get these logs regardless of if they're debugging something or not.

What is the new behavior?

The logs now go through a gated logger and stay silent unless the app asks for them with logLevel: 'DEBUG', either through setupIonicReact({ logLevel: LogLevel.DEBUG }) or ?ionic:logLevel=DEBUG in the URL. We reuse Ionic's existing logLevel config rather than adding a second switch, so DEBUG is a new member of the LogLevel enum and printIonWarning / printIonError now compare ranks instead of testing array membership.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Initially I thought all of these logs had some value, but on review I found some of them did not and caused extra overhead for no reason. During this PR, I cleaned up some logs that no longer had actual purpose, but left ones that I think will provide future value

@ShaneK
ShaneK requested a review from a team as a code owner August 10, 2026 20:38
@ShaneK
ShaneK requested a review from gnbm August 10, 2026 20:38
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview Aug 10, 2026 9:07pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package package: react @ionic/react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant