diff --git a/multipicker/build.gradle b/multipicker/build.gradle index d8cfeee3c9..8b08a9d3ef 100644 --- a/multipicker/build.gradle +++ b/multipicker/build.gradle @@ -50,4 +50,7 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation 'androidx.exifinterface:exifinterface:1.3.0-alpha01' + + // Log + implementation 'com.jakewharton.timber:timber:4.7.1' } diff --git a/multipicker/src/main/java/im/vector/riotx/multipicker/utils/ImageUtils.kt b/multipicker/src/main/java/im/vector/riotx/multipicker/utils/ImageUtils.kt index 009418fd5c..c5171e7d84 100644 --- a/multipicker/src/main/java/im/vector/riotx/multipicker/utils/ImageUtils.kt +++ b/multipicker/src/main/java/im/vector/riotx/multipicker/utils/ImageUtils.kt @@ -23,6 +23,7 @@ import android.graphics.ImageDecoder import android.net.Uri import android.os.Build import androidx.exifinterface.media.ExifInterface +import timber.log.Timber object ImageUtils { @@ -36,7 +37,7 @@ object ImageUtils { } } } catch (e: Exception) { - e.printStackTrace() + Timber.e(e, "Cannot decode Bitmap: %s", uri.toString()) null } } @@ -49,7 +50,7 @@ object ImageUtils { orientation = it.rotationDegrees } } catch (e: Exception) { - e.printStackTrace() + Timber.e(e, "Cannot read orientation: %s", uri.toString()) } } return orientation