-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Don't output console.log
s in production (don't use console.log directly)
#565
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
Comments
And we should probably add the |
I was thinking of submitting a PR to replace all the occurrences of |
Agreed on this - probably would be good to swap most |
maybe throwing errors would be better. |
😑 ... Yep. |
Plotly.js uses raw
console.log
statements to print info, warning, and error messages. Instead, it should use an abstract logger so we can silence warnings in production. Something like https://github.com/FormidableLabs/abstract-log that lets us configure anull
transport in production for anything but errors.As an example of this happening, try typing some HTML into the rich annotations editor. Before you've closed the opening tag,
svg_text_utils.js
spews errors for every update.The text was updated successfully, but these errors were encountered: