CoraLibre / CoraLibre-android-sdk

CoraLibre-android-sdk fork of prestandard DP-3T to make compatible with the Google/Apple protocol
Mozilla Public License 2.0
127 stars 7 forks source link

Log (sensitive) information only on debug builds #47

Closed Stypox closed 4 years ago

Stypox commented 4 years ago

This PR wraps logging calls into if (BuildConfig.DEBUG) statements, since debug logs are unneded in release builds and so as to prevent disclosing sensitive information.

All calls to Log.i and Log.w were converted to Log.d and wrapped with the if, since they were used only for debugging. Log.e(TAG, e.toString()) calls were converted to a e.printStackTrace(), as that provides more information. We should make sure, though, that the error messages in those exceptions do not reveal any sensitive information.

Fixes #37