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

Added timber logs #14

Merged
merged 2 commits into from
Nov 3, 2022
Merged

Added timber logs #14

merged 2 commits into from
Nov 3, 2022

Conversation

thedroiddiv
Copy link
Collaborator

@thedroiddiv thedroiddiv commented Oct 20, 2022

Timber gives us a better way to log errors or debug statements over the default logging utility. In the PR, the library has been configured in such a way that for debug builds all the logs will be printed to the logcat and for the release builds only statements logged with the priority ERROR will be sent to Crashlytics. It is important to send only a limited number of logs to Crashlytics as it remembers only the last eight reports.

A general rule of thumb that I followed is the exceptions that might occur due to backend response and our logic should be reported so that we can update or fix such things. And exceptions such as IOExceptions (during disk IO) or NetworkExceptions can be ignored as this is something that is dependent on runtime and cannot be handled by us.

Critical exceptions are logged with ERROR
Exceptions that are critical but not needed to send to Crashlytics are logged with priority WARN.
Exceptions of least priority are just logged as DEBUG.

Logs are sent to firebase as expected

Screenshot 2022-11-02 at 6 27 49 PM

@thedroiddiv thedroiddiv marked this pull request as draft October 20, 2022 17:31
@thedroiddiv thedroiddiv self-assigned this Oct 22, 2022
Timber gives us a better way to log errors or debug statements over the default logging utility. In the PR, the library has been configured in such a way that for debug builds all the logs will be printed to the logcat and for the release builds only statements logged with the priority ERROR will be sent to Crashlytics. It is important to send only a limited number of logs to Crashlytics as it remembers only the last eight reports.

A general rule of thumb that I followed is the exceptions that might occur due to backend response and our logic should be reported so that we can update or fix such things. And exceptions such as IOExceptions (during disk IO) or NetworkExceptions can be ignored as this is something that is dependent on runtime and cannot be handled by us.

Critical exceptions are logged with ERROR
Exceptions that are critical but not needed to send to Crashlytics are logged with priority WARN.
Exceptions of least priority are just logged as DEBUG.
@thedroiddiv thedroiddiv marked this pull request as ready for review October 25, 2022 13:57
@thedroiddiv thedroiddiv added needs review complete from developer's side and need review by others feature this is a feature request labels Oct 25, 2022
@anuragshukla06
Copy link
Contributor

Good work on the code comments!

@anuragshukla06 anuragshukla06 reopened this Nov 3, 2022
@anuragshukla06 anuragshukla06 merged commit abde553 into microsoft:v4-dev Nov 3, 2022
@thedroiddiv thedroiddiv deleted the timber branch November 3, 2022 11:44
@thedroiddiv thedroiddiv removed needs review complete from developer's side and need review by others feature this is a feature request labels Nov 3, 2022
@thedroiddiv
Copy link
Collaborator Author

This PR also fixes microsoft/rural-crowdsourcing-toolkit#115

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

Successfully merging this pull request may close these issues.

None yet

2 participants