chore: remove usage of console.log in primary SPA#2148
Conversation
4639f08 to
7c148ac
Compare
7c148ac to
8430928
Compare
2 flaky tests on run #3066 ↗︎Details:
|
|||||||||||||||||||||||||||
| Test | Artifacts | |
|---|---|---|
| [Common] > [User Menu] > [By Authenticated] |
Output
Screenshots
|
|
events.spec.ts • 1 flaky test • ci-chrome
| Test | Artifacts | |
|---|---|---|
| [Events] > [Create an event] > [By Authenticated] |
Output
Screenshots
|
|
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.
AlfonsoGhislieri
left a comment
There was a problem hiding this comment.
This looks good to me 👍🏻, seems like a great change to prevent these rogue console.log's making into production!
Question: All of these should now be showing up in the logflare logs?
|
@AlfonsoGhislieri, at the moment I do not think Logflare (or another aggregated logging tool) has been configured for any of the production instances. Removing the console output here is the primary outcome of this change, hooking up the platform instances to Logflare will need to be done separately by someone with edit access to CircleCI as the relevant variables, |
8430928 to
39abc72
Compare
|
Thanks @thisislawatts and @AlfonsoGhislieri If I remember correctly last time I tried looking into logflare integration there was an issue with pino-logflare compatibility for webpack 5 which we had just updated to, but I think that was fixed in #2067 so could be worth a revisit. We also have sentry and firebase crashlytics available for logging endpoints, although typically neither are actively monitored. I'd probably suggest what would be most useful is a way to override at runtime for cases where trying to quickly debug an issue in production (e.g. But for now moving things over to a logger makes any transition easier in the future as we can just configure transports directly there. |
| @@ -0,0 +1,5 @@ | |||
| { | |||
| "rules": { | |||
| "no-console": "error" | |||
There was a problem hiding this comment.
question(non-blocking)
Do you know if there's any way to add a custom message to these errors, like in https://eslint.org/docs/latest/rules/no-restricted-imports ? I'm not aware of any myself, just think might be nice to advise developers something along the lines of "Should use logger instead of console" to make clear. Not super important, just a thought.
chrismclarke
left a comment
There was a problem hiding this comment.
I added one non-blocking question inline but otherwise all looks good to me also, many thanks
|
Thanks @chrismclarke |
|
🎉 This PR is included in version 1.41.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
PR Checklist
PR Type
Description
@AlfonsoGhislieri raised a really useful bit of PR feedback around
console.log. I propose we adopt automated checks to catch this and free up our reviewers time to concentrate on details not solved with tooling.What happens next?
Thanks for the contribution! We try to make sure all PRs are reviewed ahead of a monthly dev call (first Monday of the month, open to all!).
If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.
If you need more immediate feedback you can try reaching out on Discord in the Community Platform
developmentchannel.