Repository navigation
feat: replace logging by tmc component - #11668
Conversation
|
✅ Validation Passed: All report and feature-flag labels are correctly set. |
5283b99 to
bd5c2c3
Compare
bd5c2c3 to
27958ea
Compare
27958ea to
013da00
Compare
013da00 to
60e2518
Compare
60e2518 to
4d37158
Compare
rafaeltonholo
left a comment
There was a problem hiding this comment.
I have just a small concern about the DefaultStorageMigrationHelper; other than that all good to me.
| } | ||
|
|
||
| private fun syncDebugLogFile(directoryProvider: DirectoryProvider): PlatformFile { | ||
| val filesDirectory = requireNotNull(directoryProvider.getFilesDir().path) |
There was a problem hiding this comment.
nit: I would add a message explaining why the path is required to be null, so it makes easier to debug in case of any bugs.
There was a problem hiding this comment.
I added a description that the path is required to be not null.
| class DefaultStorageMigrationHelper : StorageMigrationHelper { | ||
| override fun readAllValues(db: SQLiteDatabase): Map<String, String> { | ||
| return db.query(TABLE_NAME, arrayOf(KEY_COLUMN, VALUE_COLUMN), null, null, null, null, null).use { | ||
| it.map { cursor -> | ||
| val key = cursor.getStringOrThrow(KEY_COLUMN) | ||
| val value = cursor.getStringOrThrow(VALUE_COLUMN) | ||
| Log.d("Loading key '%s', value = '%s'", key, value) | ||
| Log.d(TAG, "Loading key '%s', value = '%s'", key, value) |
There was a problem hiding this comment.
This log will potentially expose sensitive data. I would recommend removing it or wrap it inside an if checking whetherBuildConfig.DEBUG is enabled.
I wouldn't let that be logged even if users have enabled the Debug Logs in the production app.
Same for the other logs in this class that logs the value.
There was a problem hiding this comment.
I removed the values from the logging.
7f8144c to
1007976
Compare
Contribution Summary
Linked Issue/Ticket: Resolves #11716
Depends on: thunderbird/thunderbird-mobile-components#173 being merged and released
Description
Replace the app’s logging implementation with the logger from TMC. Migrate callers and tests, update debug-log export and documentation, and remove unused logging code.
Expected to fail until the library is released.
AI Disclosure
Select one of the following (mandatory)