summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2024-04-12 14:22:18 -0600
committerMarc Stibane <marc@taler.net>2024-04-12 22:33:09 +0200
commit66f8b9585e1743d8f764dccd1b77c4f095c5d354 (patch)
treec0c21b1504e82684ff16ccdb220412854008c07e
parent4eb43460a2a98d524a1270ac5768902559544fac (diff)
downloadtaler-ios-66f8b9585e1743d8f764dccd1b77c4f095c5d354.tar.gz
taler-ios-66f8b9585e1743d8f764dccd1b77c4f095c5d354.tar.bz2
taler-ios-66f8b9585e1743d8f764dccd1b77c4f095c5d354.zip
Log observability events
-rw-r--r--TalerWallet1/Backend/WalletCore.swift10
-rw-r--r--TalerWallet1/Controllers/PublicConstants.swift2
2 files changed, 12 insertions, 0 deletions
diff --git a/TalerWallet1/Backend/WalletCore.swift b/TalerWallet1/Backend/WalletCore.swift
index 47df531..f2b4f86 100644
--- a/TalerWallet1/Backend/WalletCore.swift
+++ b/TalerWallet1/Backend/WalletCore.swift
@@ -301,6 +301,16 @@ extension WalletCore {
case Notification.Name.ProposalDownloaded.rawValue: // "proposal-downloaded":
symLog.log(anyPayload)
postNotification(.ProposalDownloaded, userInfo: nil)
+ case Notification.Name.TaskObservabilityEvent.rawValue:
+ symLog.log(anyPayload)
+ if let json = anyPayload.toJSON() {
+ observe(message: json)
+ }
+ case Notification.Name.RequestObservabilityEvent.rawValue:
+ symLog.log(anyPayload)
+ if let json = anyPayload.toJSON() {
+ observe(message: json)
+ }
// TODO: remove these once wallet-core doesn't send them anymore
// case "refresh-started", "refresh-melted",
diff --git a/TalerWallet1/Controllers/PublicConstants.swift b/TalerWallet1/Controllers/PublicConstants.swift
index 5b563d0..9515947 100644
--- a/TalerWallet1/Controllers/PublicConstants.swift
+++ b/TalerWallet1/Controllers/PublicConstants.swift
@@ -81,6 +81,8 @@ extension Notification.Name {
// static let PayOperationSuccess = Notification.Name("pay-operation-success")
static let ProposalAccepted = Notification.Name("proposal-accepted")
static let ProposalDownloaded = Notification.Name("proposal-downloaded")
+ static let TaskObservabilityEvent = Notification.Name("task-observability-event")
+ static let RequestObservabilityEvent = Notification.Name("request-observability-event")
static let Error = Notification.Name("error")
}