Use android.util.Log
for logging
#120
Merged
+66
−53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This way, the SDK has a control over which logs will be used in production or debug variants of SDK users. As on outcome, this change reduces number of logs that the SDK is producing in production apps.
Closes: #83
Closes: #119
The #119 issue is a result of
StringBuilder
trying to allocate a significant part of available memory. This is probably a result of a case, in which consumer app tries to report many events: either due to device being offline for a long period or a misconfiguration of the SDK. This PR will stop logging whole payloads in production apps, what will likely address the issue.Testing
Not necessary: both unit and functional tests pass. If still needed, one can open an example app and validate the logs via Logcat.