We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0cb4bdc + e957a4c commit ef6901cCopy full SHA for ef6901c
Sentry/src/main/kotlin/com/infomaniak/core/sentry/SentryLog.kt
@@ -28,6 +28,18 @@ object SentryLog {
28
29
private val TAG = SentryLog::class.java.simpleName
30
31
+ inline fun <R> i(tag: String, msg: String, block: () -> R): R {
32
+ try {
33
+ i(tag, "$msg entered")
34
+ val result = block()
35
+ i(tag, "$msg exited successfully")
36
+ return result
37
+ } catch (t: Throwable) {
38
+ i(tag, "$msg exited with throwable", t)
39
+ throw t
40
+ }
41
42
+
43
fun v(tag: String, msg: String, throwable: Throwable? = null) {
44
val formattedMessage = formatLogMessage(tag, msg)
45
Log.v(TAG, formattedMessage, throwable)
0 commit comments