-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Use server logs instead of console.debug most places #5827
Conversation
A few things I thought about doing but didn't:
|
Hi @roryabraham! :) I found there are still few places where |
I'm a bit concerned about not logging to the server the messages in those locations because for example this issue seems to be caused in I was thinking if it's better to decouple the logic that uses Lines 51 to 76 in 9ea80ba
And call the new file may be in |
src/libs/actions/PersonalDetails.js
Outdated
@@ -129,7 +130,7 @@ function fetchPersonalDetails() { | |||
// Set my personal details so they can be easily accessed and subscribed to on their own key | |||
Onyx.merge(ONYXKEYS.MY_PERSONAL_DETAILS, myPersonalDetails); | |||
}) | |||
.catch(error => console.debug('Error fetching personal details', error)); | |||
.catch(error => Log.hmmm('Error fetching personal details', error)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are going to catch and log API promise rejections then perhaps we should do it in a global way so we don't have to apply these inconsistently? Same comment about local currency, reportStuff, etc calls below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, added a global server log for API errors here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, that takes care of the logs, but will we have unhandled rejections now for these cases?
To be totally honest, I'm not sure in which cases this should reject or why a catch()
was added - but if it was throwing before it was handled and with your change they are not. Does it matter?
@marcochavezf I agree that those logs would be really valuable to have and it would be nice if we can come up with a solution for the circular dependency. But sorry not sure if I understand the exact proposal. Maybe it would be acceptable in these few cases to just call |
@marcaaron Ah yeah, in other words, I think to remove the circular dependency issues we can move all this code to a new file (let's say the new file can be Lines 10 to 21 in 029a3dd
Lines 44 to 80 in 029a3dd
Lines 144 to 182 in 029a3dd
And the new file now could import But I think calling |
IMO I think |
Okay, I've made some updates and this is ready for another review. Take a look at the remaining uses of |
Just to be sure, these Line 99 in 7b50d3d
App/src/libs/PusherConnectionManager.js Line 14 in 7b50d3d
App/src/libs/actions/Timing.js Line 43 in 7b50d3d
|
so maybe it could be deleted (but not sure if it should be left without a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @marcaaron in version: 1.1.8-10 🚀
|
This will be internal QA btw |
Did some testing on staging, marking this as a QA-pass. |
🚀 Deployed to production by @roryabraham in version: 1.1.10-2 🚀
|
Details
Send NewDot logs to servers where it is possible + makes sense.
Fixed Issues
$ #5624
Tests / QA Steps.
Tested On
Screenshots
Confirmed that logs are still showing up in console and sending in batches (of 50):