gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 55/69: logging


From: gnunet
Subject: [taler-taler-ios] 55/69: logging
Date: Fri, 19 Jan 2024 09:02:28 +0100

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 601bbf4d09d90871f8a46c3533f5e110dd8d127f
Author: Marc Stibane <marc@taler.net>
AuthorDate: Thu Jan 18 00:44:57 2024 +0100

    logging
---
 TalerWallet1/Backend/WalletCore.swift | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/TalerWallet1/Backend/WalletCore.swift 
b/TalerWallet1/Backend/WalletCore.swift
index 9cd2a48..fe0f135 100644
--- a/TalerWallet1/Backend/WalletCore.swift
+++ b/TalerWallet1/Backend/WalletCore.swift
@@ -153,7 +153,7 @@ extension WalletCore {
                                  userInfo: [AnyHashable: Any]? = nil) {
         Task { // runs on MainActor
             await postNotificationM(aName, object: anObject, userInfo: 
userInfo)
-            logger.info("Notification sent: \(aName.rawValue)")
+//            logger.info("Notification sent: \(aName.rawValue, privacy: 
.public)")
         }
     }
 
@@ -206,13 +206,13 @@ extension WalletCore {
                         case .aborting:
                             if let newMinor = decoded.newTxState.minor {
                                 if newMinor == .refreshExpired {
-                                    logger.warning("Expired: 
\(decoded.transactionId, privacy: .private(mask: .hash))")
+                                    logger.warning("RefreshExpired: 
\(decoded.transactionId, privacy: .private(mask: .hash))")
                                     Controller.shared.playSound(0)
                                     postNotification(.TransactionExpired, 
userInfo: [TRANSACTIONTRANSITION: decoded])
                                     return
                                 }
                             }
-                            logger.warning("Unknow aborting: 
\(decoded.transactionId, privacy: .private(mask: .hash))")
+                            logger.warning("Unknown aborting: 
\(decoded.transactionId, privacy: .private(mask: .hash))")
                             postNotification(.TransactionStateTransition, 
userInfo: [TRANSACTIONTRANSITION: decoded])
                         case .expired:
                             logger.warning("Expired: \(decoded.transactionId, 
privacy: .private(mask: .hash))")
@@ -235,8 +235,10 @@ extension WalletCore {
                                     postNotification(.KYCrequired, userInfo: 
[TRANSACTIONTRANSITION: decoded])
                                     return
                                 }
-                            }
+                                logger.log("Pending:\(newMinor.rawValue, 
privacy: .public) \(decoded.transactionId, privacy: .private(mask: .hash))")
+                            } else {
                             logger.log("Pending: \(decoded.transactionId, 
privacy: .private(mask: .hash))")
+                            }
                             postNotification(.TransactionStateTransition, 
userInfo: [TRANSACTIONTRANSITION: decoded])
                         default:
                             logger.warning("Unknow transition: 
\(decoded.transactionId, privacy: .private(mask: .hash))")
@@ -360,6 +362,7 @@ print("\n❗️ WalletCore.swift:251 Notification: ", 
anyPayload, "\n")        /
                 self.requestsMade += 1
                 self.semaphore.signal()         // free requestsMade
               self.symLog.log(jsonString)
+              self.logger.log("sendRequest \(requestId, privacy: .public): 
\(request.operation, privacy: .public)")
                 self.quickjs.sendMessage(message: jsonString)
             } catch {       // call completion
                 self.semaphore.signal()
@@ -379,7 +382,7 @@ extension WalletCore {
             sendRequest(request: reqData) { requestId, timeSent, result, error 
in
                 let timeUsed = Date.now - timeSent
                 let millisecs = timeUsed.milliseconds
-                self.logger.info("Request \(requestId) took \(millisecs) ms")
+                self.logger.info("Request \(requestId, privacy: .public) took 
\(millisecs, privacy: .public) ms")
                 var err: Error? = nil
                 if let json = result {
                     do {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]