-
Notifications
You must be signed in to change notification settings - Fork 487
Implement specific logs to analyse (EXPOSUREAPP-3440) #1563
Implement specific logs to analyse (EXPOSUREAPP-3440) #1563
Conversation
harambasicluka
left a comment
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.
IMHO the ticket was about adding a log when the high risk notification is send and also log "the notification permissions for the app to ensure everything is configured right". So please add logs in this locations.
Notification Permissions logged and notification sent is loggged
Hi Luka, The changes have been pushed. Please check them out |
chiljamgossow
left a comment
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.
Some minor suggestions. Since it is only for debugging, it's also fine if you leave it as it is.
| } | ||
| } | ||
|
|
||
| Timber.d("$id: doWork() finished with %s", result) |
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.
I there a reason you do not write Timber.d("$id: doWork() finished with $result")?
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.
Doesn't matter here I think, but the difference would be:
The solution with %s using string formatting would defer the toString evaluation until it's actually needed. So in the scenario where result is a complex object (i.e. a list of complex objects), we would not evaluate it toString() if logging is disabled (internal optimization in Timber).
|
|
||
| if (runAttemptCount > BackgroundConstants.WORKER_RETRY_COUNT_THRESHOLD) { | ||
| Timber.d("Background job failed after $runAttemptCount attempts. Rescheduling") | ||
| Timber.d("$id Background job failed after $runAttemptCount attempts. Rescheduling") |
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.
Minor: Maybe also use doWork() instead of Background job in the log here for consistency?
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.
Makes sense.
harambasicluka
left a comment
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.
It's fine from my point of view but please discuss the open points with @chiljamgossow :)
8715185
chiljamgossow
left a comment
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.
Looks fine to me
|
Kudos, SonarCloud Quality Gate passed!
|
Description
Log improvement where the PR tries to introduce more point of logs and information about Background Workers and their operations
Steps to reproduce
Test Menu > Debug Options > Logfiled enabled togled to true > Share Log button > Observe the saved file location
How to get to the file.