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

console.log unnecessarily noisy #2289

Closed
develohpanda opened this issue Mar 5, 2024 · 3 comments · Fixed by #2290
Closed

console.log unnecessarily noisy #2289

develohpanda opened this issue Mar 5, 2024 · 3 comments · Fixed by #2290
Labels

Comments

@develohpanda
Copy link
Contributor

Hi there!

I have noticed that this particular console.log is unnecessarily printing null in unit tests or a server (SSR) environment. In each of these cases, the application insights object is instantiated, but is not actually initialized - it is only initialized on the browser.

https://github.com/microsoft/ApplicationInsights-JS/blob/724d5204e3cdc50d9402d415f021d816a4c11b45/extensions/applicationinsights-debugplugin-js/src/components/styleNodeSrc.ts#L18C1-L18C29

However, in these environments, it always prints null to console and really clutters the test output.

image

I'm not sure what purpose this console.log serves; but I am happy to contribute a PR in case you have suggestions for what can be done to reduce the noise.

@MSNev
Copy link
Collaborator

MSNev commented Mar 5, 2024

Please feel free to submit a PR, we should not be using any console.log's, while it's in a test -- maybe it was originally for debugging.

@MSNev
Copy link
Collaborator

MSNev commented Mar 5, 2024

Oh, hangon -- is that in the debugplugin -- yikes! This should be removed.

@develohpanda
Copy link
Contributor Author

PR submitted! 😊

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

Successfully merging a pull request may close this issue.

2 participants