Clean up logging

This commit is contained in:
Inhishonor
2025-12-20 15:57:29 -08:00
parent b4bce2c1a9
commit 096c7e3c68
63 changed files with 174 additions and 272 deletions
@@ -19,7 +19,6 @@
package dev.octoshrimpy.quik.manager
import android.content.Context
import android.util.Log
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import com.squareup.moshi.Moshi
@@ -28,6 +27,7 @@ import dev.octoshrimpy.quik.common.util.extensions.versionCode
import dev.octoshrimpy.quik.util.Preferences
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import timber.log.Timber
import javax.inject.Inject
class ChangelogManagerImpl @Inject constructor(
@@ -60,7 +60,7 @@ class ChangelogManagerImpl @Inject constructor(
)
} catch (e: Exception) {
Log.e("ChangelogManager", "Error parsing changelog JSON", e)
Timber.e(e, "Error parsing changelog JSON")
ChangelogManager.CumulativeChangelog(emptyList(), emptyList(), emptyList(), emptyList())
}
}
@@ -349,7 +349,7 @@ object QkTransaction {
address, null, parts, sPI, dPI.ifEmpty { null }
)
} catch (e: Exception) {
Timber.e("send sms exception", e)
Timber.e(e, "send sms exception")
}
return true
@@ -374,7 +374,7 @@ object QkTransaction {
null, subscriptionId
)
} catch (e: Exception) {
Timber.e("failed to create mms message", e)
Timber.e(e, "failed to create mms message")
}
return Uri.EMPTY
@@ -390,7 +390,7 @@ object QkTransaction {
try {
pdu = PduPersister.getPduPersister(context).load(messageUri)
} catch (e: MmsException) {
Timber.e("load pdu from provider failed", e)
Timber.e(e, "load pdu from provider failed")
return retVal
}
@@ -439,7 +439,7 @@ object QkTransaction {
)
)
} catch (e: Exception) {
Timber.e("failed creating provider mms message", e)
Timber.e(e, "failed creating provider mms message")
}
}
@@ -488,7 +488,7 @@ object QkTransaction {
val sendPdu = try {
PduPersister.getPduPersister(context).load(messageUri)
} catch (e: MmsException) {
Timber.e("pdu from provider db failed", e)
Timber.e(e, "pdu from provider db failed")
return false
}
@@ -507,7 +507,7 @@ object QkTransaction {
.scheme(ContentResolver.SCHEME_CONTENT)
.build()
} catch (e: IOException) {
Timber.e("error writing send file", e)
Timber.e(e, "error writing send file")
return false
}
@@ -529,7 +529,7 @@ object QkTransaction {
pendingIntent
)
} catch (e: Exception) {
Timber.e("failed sending mms", e)
Timber.e(e, "failed sending mms")
return false
}
@@ -274,7 +274,7 @@ class ReceiveMmsWorker(appContext: Context, workerParams: WorkerParameters)
}
Timber.v("notify send file $fileName")
} catch (e: Exception) {
Timber.e("error writing notify send file", e)
Timber.e(e, "error writing notify send file")
}
val useWapMmsc = com.android.mms.MmsConfig.getNotifyWapMMSC()
@@ -318,7 +318,7 @@ class ReceiveMmsWorker(appContext: Context, workerParams: WorkerParameters)
sendResponsePdu(context, subscriptionId, notificationInd.contentLocation, pdu)
}
} catch (e: Exception) {
Timber.e("error creating m-acknowledge.ind", e)
Timber.e(e, "error creating m-acknowledge.ind")
}
}
@@ -341,7 +341,7 @@ class ReceiveMmsWorker(appContext: Context, workerParams: WorkerParameters)
sendResponsePdu(context, subscriptionId, notificationInd.contentLocation, pdu)
}
} catch (e: Exception) {
Timber.e("error creating m-notifyresp.ind", e)
Timber.e(e, "error creating m-notifyresp.ind")
}
}