Skip to content

Commit 05b2a37

Browse files
committed
chore: add tag parameter to logs
1 parent 2a77012 commit 05b2a37

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/src/main/java/to/bitkit/fcm/WakeNodeWorker.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import kotlinx.serialization.json.JsonPrimitive
1515
import kotlinx.serialization.json.contentOrNull
1616
import kotlinx.serialization.json.jsonObject
1717
import org.lightningdevkit.ldknode.Event
18+
import to.bitkit.App
1819
import to.bitkit.R
1920
import to.bitkit.data.CacheStore
2021
import to.bitkit.data.SettingsStore
@@ -61,15 +62,15 @@ class WakeNodeWorker @AssistedInject constructor(
6162
private val deliverSignal = CompletableDeferred<Unit>()
6263

6364
override suspend fun doWork(): Result {
64-
Logger.debug("Node wakeup from notification…")
65+
Logger.debug("Node wakeup from notification…", context = TAG)
6566

6667
notificationType = workerParams.inputData.getString("type")?.let { BlocktankNotificationType.valueOf(it) }
6768
notificationPayload = workerParams.inputData.getString("payload")?.let {
6869
runCatching { json.parseToJsonElement(it).jsonObject }.getOrNull()
6970
}
7071

71-
Logger.debug("${this::class.simpleName} notification type: $notificationType")
72-
Logger.debug("${this::class.simpleName} notification payload: $notificationPayload")
72+
Logger.debug("$TAG notification type: $notificationType", context = TAG)
73+
Logger.debug("$TAG notification payload: $notificationPayload", context = TAG)
7374

7475
try {
7576
withPerformanceLogging {
@@ -249,4 +250,8 @@ class WakeNodeWorker @AssistedInject constructor(
249250

250251
deliverSignal.complete(Unit)
251252
}
253+
254+
companion object {
255+
private const val TAG = "WakeNodeWorker"
256+
}
252257
}

0 commit comments

Comments
 (0)