Skip to content

Commit 7b1019c

Browse files
committed
chore: add tag parameter to logs
1 parent 05b2a37 commit 7b1019c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ class WakeNodeWorker @AssistedInject constructor(
8585
val orderId = (notificationPayload?.get("orderId") as? JsonPrimitive)?.contentOrNull
8686

8787
if (orderId == null) {
88-
Logger.error("Missing orderId")
88+
Logger.error("Missing orderId", context = TAG)
8989
} else {
9090
try {
91-
Logger.info("Open channel request for order $orderId")
91+
Logger.info("Open channel request for order $orderId", context = TAG)
9292
coreService.blocktank.open(orderId = orderId)
9393
} catch (e: Exception) {
94-
Logger.error("failed to open channel", e)
94+
Logger.error("failed to open channel", e, context = TAG)
9595
bestAttemptContent = NotificationDetails(
9696
title = appContext.getString(R.string.notification_channel_open_failed_title),
9797
body = e.message ?: appContext.getString(R.string.notification_unknown_error),
@@ -110,7 +110,7 @@ class WakeNodeWorker @AssistedInject constructor(
110110
title = appContext.getString(R.string.notification_lightning_error_title),
111111
body = reason,
112112
)
113-
Logger.error("Lightning error", e)
113+
Logger.error("Lightning error", e, context = TAG)
114114
deliver()
115115

116116
return Result.failure(workDataOf("Reason" to reason))
@@ -245,7 +245,7 @@ class WakeNodeWorker @AssistedInject constructor(
245245

246246
bestAttemptContent?.run {
247247
appContext.pushNotification(title, body)
248-
Logger.info("Delivered notification")
248+
Logger.info("Delivered notification", context = TAG)
249249
}
250250

251251
deliverSignal.complete(Unit)

0 commit comments

Comments
 (0)