gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 10/54: Reduce Logging


From: gnunet
Subject: [taler-taler-ios] 10/54: Reduce Logging
Date: Fri, 30 Jun 2023 22:33:42 +0200

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 0222d2130cd08d65d9c33d98be856650219979ce
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Jun 20 09:03:55 2023 +0200

    Reduce Logging
---
 TalerWallet1/Backend/WalletCore.swift              |  6 +++---
 TalerWallet1/Controllers/DebugViewC.swift          |  4 ++--
 TalerWallet1/Controllers/TalerWallet1App.swift     | 12 ++++++------
 TalerWallet1/Model/BalancesModel.swift             |  2 +-
 TalerWallet1/Model/ExchangeModel.swift             |  2 +-
 TalerWallet1/Model/PaymentURIModel.swift           |  2 +-
 TalerWallet1/Model/Peer2peerModel.swift            |  2 +-
 TalerWallet1/Model/PendingModel.swift              |  2 +-
 TalerWallet1/Model/SettingsModel.swift             |  2 +-
 TalerWallet1/Model/TransactionsModel.swift         |  2 +-
 TalerWallet1/Model/WalletInitModel.swift           |  2 +-
 TalerWallet1/Model/WithdrawModel.swift             |  2 +-
 TalerWallet1/Views/Balances/BalancesListView.swift |  2 +-
 TalerWallet1/Views/Exchange/ExchangeListView.swift |  2 +-
 TalerWallet1/Views/Main/ErrorView.swift            |  2 +-
 TalerWallet1/Views/Main/MainView.swift             |  2 +-
 TalerWallet1/Views/Main/WalletEmptyView.swift      |  2 +-
 TalerWallet1/Views/Settings/SettingsView.swift     |  2 +-
 18 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/TalerWallet1/Backend/WalletCore.swift 
b/TalerWallet1/Backend/WalletCore.swift
index 6b70b4f..684aaa7 100644
--- a/TalerWallet1/Backend/WalletCore.swift
+++ b/TalerWallet1/Backend/WalletCore.swift
@@ -139,16 +139,16 @@ extension WalletCore {
     private func postNotificationM(_ aName: NSNotification.Name,
                            object anObject: Any? = nil,
                                   userInfo: [AnyHashable: Any]? = nil) async {
-        symLog.log(aName.rawValue)
         NotificationCenter.default.post(name: aName, object: anObject, 
userInfo: userInfo)
     }
     private func postNotification(_ aName: NSNotification.Name,
                           object anObject: Any? = nil,
                                  userInfo: [AnyHashable: Any]? = nil) {
         Task {
+            if let userInfo { symLog.log(userInfo) } else { symLog.log(aName) }
             await postNotificationM(aName, object: anObject, userInfo: 
userInfo)
+            symLog.log("sent " + aName.rawValue)
         }
-        if let userInfo { symLog.log(userInfo) } else { symLog.log(aName) }
     }
 
     private func handlePendingProcessed(_ payload: Payload) throws {
@@ -223,7 +223,7 @@ print("\n❗️ \(pendingOp): \(id)\n")        // this is a new 
pendingOp I have
                      "refresh-revealed", "refresh-unwarranted":
                     break
                 default:
-print("\n❗️ ", anyPayload, "\n")        // this is a new notification I 
haven't seen before
+print("\n❗️ WalletCore.swift:226 Notification: ", anyPayload, "\n")        // 
this is a new notification I haven't seen before
                     break
             }
         } catch let error {
diff --git a/TalerWallet1/Controllers/DebugViewC.swift 
b/TalerWallet1/Controllers/DebugViewC.swift
index 828ba08..ec5b3db 100644
--- a/TalerWallet1/Controllers/DebugViewC.swift
+++ b/TalerWallet1/Controllers/DebugViewC.swift
@@ -90,7 +90,7 @@ public let SHEET_RCV_P2P = SHEET_PAY_P2P + 10                 
      // 170 Recei
 
 // MARK: -
 struct DebugViewV: View {
-    private let symLog = SymLogV()
+    private let symLog = SymLogV(0)
     @EnvironmentObject private var debugViewC: DebugViewC
 
     var body: some View {
@@ -113,7 +113,7 @@ struct DebugViewV: View {
 }
 // MARK: -
 class DebugViewC: ObservableObject {
-    private let symLog = SymLogC()                         // 0 to switch off 
viewID change logging
+    private let symLog = SymLogC(0)                         // 0 to switch off 
viewID change logging
     public static let shared = DebugViewC()
     @AppStorage("developerMode") var developerMode: Bool = false
 
diff --git a/TalerWallet1/Controllers/TalerWallet1App.swift 
b/TalerWallet1/Controllers/TalerWallet1App.swift
index 98593ce..da2a626 100644
--- a/TalerWallet1/Controllers/TalerWallet1App.swift
+++ b/TalerWallet1/Controllers/TalerWallet1App.swift
@@ -45,27 +45,27 @@ struct TalerWallet1App: App {
                     symLog.log("task -> initWalletCore done")
                 }
                 .onReceive(NotificationCenter.default.publisher(for: 
UIApplication.didBecomeActiveNotification, object: nil)) { _ in
-                    print("❗️App Did Become Active notification")
+                    symLog.log("❗️App Did Become Active notification")
                 }
                 .onReceive(NotificationCenter.default.publisher(for: 
UIApplication.willResignActiveNotification, object: nil)) { _ in
-                    print("❗️App Will Resign notification")
+                    symLog.log("❗️App Will Resign notification")
                     isActive = false
                 }
                 .onReceive(NotificationCenter.default.publisher(for: 
UIApplication.willEnterForegroundNotification, object: nil)) { _ in
-                    print("❗️App Will Enter Foreground notification")
+                    symLog.log("❗️App Will Enter Foreground notification")
                     isActive = true
                 }
                 .onReceive(NotificationCenter.default.publisher(for: 
UIApplication.willTerminateNotification, object: nil)) { _ in
-                    print("❗️App Will Terminate notification")
+                    symLog.log("❗️App Will Terminate notification")
                 }
 
         }
         .onChange(of: phase) { newPhase in
             switch newPhase {
                 case .active:
-                    print("❗️ .onChange(of: phase) ==> newPhase: Active")
+                    symLog.log("❗️ .onChange(of: phase) ==> newPhase: Active")
                 case .background:
-                    print("❗️ .onChange(of: phase) ==> newPhase: Background)")
+                    symLog.log("❗️ .onChange(of: phase) ==> newPhase: 
Background)")
                     scheduleAppRefresh()
                 default: break
             }
diff --git a/TalerWallet1/Model/BalancesModel.swift 
b/TalerWallet1/Model/BalancesModel.swift
index b538915..0940c4e 100644
--- a/TalerWallet1/Model/BalancesModel.swift
+++ b/TalerWallet1/Model/BalancesModel.swift
@@ -10,7 +10,7 @@ fileprivate let ASYNCDELAY: UInt = 0   //set e.g to 6 or 9 
seconds for debugging
 class BalancesModel: WalletModel {
 
     override init(_ symbol: Int = -1) {     // init with 0 to disable logging 
for this class
-        super.init(symbol)
+        super.init(0)//symbol)
     }
 }
 // MARK: -
diff --git a/TalerWallet1/Model/ExchangeModel.swift 
b/TalerWallet1/Model/ExchangeModel.swift
index 17169d8..58bf12a 100644
--- a/TalerWallet1/Model/ExchangeModel.swift
+++ b/TalerWallet1/Model/ExchangeModel.swift
@@ -9,7 +9,7 @@ fileprivate let ASYNCDELAY: UInt = 0   //set e.g to 6 or 9 
seconds for debugging
 
 class ExchangeModel: WalletModel {
     override init(_ symbol: Int = -1) {
-        super.init(symbol)
+        super.init(0)//symbol)
     }
 }
 // MARK: -
diff --git a/TalerWallet1/Model/PaymentURIModel.swift 
b/TalerWallet1/Model/PaymentURIModel.swift
index 73f7036..8f758d6 100644
--- a/TalerWallet1/Model/PaymentURIModel.swift
+++ b/TalerWallet1/Model/PaymentURIModel.swift
@@ -11,7 +11,7 @@ fileprivate let ASYNCDELAY: UInt = 0   //set e.g to 6 or 9 
seconds for debugging
 class PaymentURIModel: WalletModel {
 
     override init(_ symbol: Int = -1) {     // init with 0 to disable logging 
for this class
-        super.init(symbol)
+        super.init(0)//symbol)
     }
 }
 // MARK: - ContractTerms
diff --git a/TalerWallet1/Model/Peer2peerModel.swift 
b/TalerWallet1/Model/Peer2peerModel.swift
index b8ef429..ded3d10 100644
--- a/TalerWallet1/Model/Peer2peerModel.swift
+++ b/TalerWallet1/Model/Peer2peerModel.swift
@@ -10,7 +10,7 @@ fileprivate let ASYNCDELAY: UInt = 0   //set e.g to 6 or 9 
seconds for debugging
 
 class Peer2peerModel: WalletModel {
     override init(_ symbol: Int = -1) {     // init with 0 to disable logging 
for this class
-        super.init(symbol)
+        super.init(0)//symbol)
     }
 }
 // MARK: - PeerContractTerms
diff --git a/TalerWallet1/Model/PendingModel.swift 
b/TalerWallet1/Model/PendingModel.swift
index 990b10d..9021301 100644
--- a/TalerWallet1/Model/PendingModel.swift
+++ b/TalerWallet1/Model/PendingModel.swift
@@ -11,7 +11,7 @@ fileprivate let ASYNCDELAY: UInt = 0   //set e.g to 6 or 9 
seconds for debugging
 class PendingModel: WalletModel {
 
     override init(_ symbol: Int = -1) {
-        super.init(symbol)
+        super.init(0)//symbol)
     }
 }
 // MARK: -
diff --git a/TalerWallet1/Model/SettingsModel.swift 
b/TalerWallet1/Model/SettingsModel.swift
index 10d35c0..0ca0d8a 100644
--- a/TalerWallet1/Model/SettingsModel.swift
+++ b/TalerWallet1/Model/SettingsModel.swift
@@ -16,7 +16,7 @@ fileprivate let DEMO_MERCHANTAUTHTOKEN = 
"secret-token:sandbox"
 // MARK: -
 class SettingsModel: WalletModel {
     override init(_ symbol: Int = -1) {     // init with 0 to disable logging 
for this class
-        super.init(symbol)
+        super.init(0)//symbol)
     }
 }
 // MARK: -
diff --git a/TalerWallet1/Model/TransactionsModel.swift 
b/TalerWallet1/Model/TransactionsModel.swift
index bb90bdb..0f4917a 100644
--- a/TalerWallet1/Model/TransactionsModel.swift
+++ b/TalerWallet1/Model/TransactionsModel.swift
@@ -33,7 +33,7 @@ class TransactionsModel: WalletModel {
     }
 
     override init(_ symbol: Int = -1) {
-        super.init(symbol)
+        super.init(0)//symbol)
     }
 }
 
diff --git a/TalerWallet1/Model/WalletInitModel.swift 
b/TalerWallet1/Model/WalletInitModel.swift
index 8ce0bf4..28393bd 100644
--- a/TalerWallet1/Model/WalletInitModel.swift
+++ b/TalerWallet1/Model/WalletInitModel.swift
@@ -9,7 +9,7 @@ private let DATABASE = "talerwalletdb-v30"
 
 class WalletInitModel: WalletModel {
     override init(_ symbol: Int = -1) {     // init with 0 to disable logging 
for this class
-        super.init(symbol)
+        super.init(0)//symbol)
     }
 }
 // MARK: -
diff --git a/TalerWallet1/Model/WithdrawModel.swift 
b/TalerWallet1/Model/WithdrawModel.swift
index 96fc31a..28fed21 100644
--- a/TalerWallet1/Model/WithdrawModel.swift
+++ b/TalerWallet1/Model/WithdrawModel.swift
@@ -10,7 +10,7 @@ fileprivate let ASYNCDELAY: UInt = 0   //set e.g to 6 or 9 
seconds for debugging
 class WithdrawModel: WalletModel {
 
     override init(_ symbol: Int = -1) {     // init with 0 to disable logging 
for this class
-        super.init(symbol)
+        super.init(0)//symbol)
     }
 }
 
diff --git a/TalerWallet1/Views/Balances/BalancesListView.swift 
b/TalerWallet1/Views/Balances/BalancesListView.swift
index d4b46e0..cd9d667 100644
--- a/TalerWallet1/Views/Balances/BalancesListView.swift
+++ b/TalerWallet1/Views/Balances/BalancesListView.swift
@@ -10,7 +10,7 @@ import AVFoundation
 /// This view shows the list of balances / currencies, each in its own section
 
 struct BalancesListView: View {
-    private let symLog = SymLogV()
+    private let symLog = SymLogV(0)
     let navTitle: String
 
     @State var balances: [Balance] = []
diff --git a/TalerWallet1/Views/Exchange/ExchangeListView.swift 
b/TalerWallet1/Views/Exchange/ExchangeListView.swift
index 96c880e..46644bd 100644
--- a/TalerWallet1/Views/Exchange/ExchangeListView.swift
+++ b/TalerWallet1/Views/Exchange/ExchangeListView.swift
@@ -8,7 +8,7 @@ import SymLog
 
 /// This view shows the list of exchanges
 struct ExchangeListView: View {
-    private let symLog = SymLogV()
+    private let symLog = SymLogV(0)
     let navTitle: String
 
     var model: ExchangeModel?
diff --git a/TalerWallet1/Views/Main/ErrorView.swift 
b/TalerWallet1/Views/Main/ErrorView.swift
index 50e0515..d322200 100644
--- a/TalerWallet1/Views/Main/ErrorView.swift
+++ b/TalerWallet1/Views/Main/ErrorView.swift
@@ -6,7 +6,7 @@ import SwiftUI
 import SymLog
 
 struct ErrorView: View {
-    private let symLog = SymLogV()
+    private let symLog = SymLogV(0)
 
     let errortext: String?
 
diff --git a/TalerWallet1/Views/Main/MainView.swift 
b/TalerWallet1/Views/Main/MainView.swift
index 81878f2..b2745b6 100644
--- a/TalerWallet1/Views/Main/MainView.swift
+++ b/TalerWallet1/Views/Main/MainView.swift
@@ -14,7 +14,7 @@ struct LazyView<Content: View>: View {
 }
 
 struct MainView: View {
-    private let symLog = SymLogV()
+    private let symLog = SymLogV(0)
     @EnvironmentObject private var viewState: ViewState         // 
popToRootView()
     @EnvironmentObject private var controller: Controller
     @State private var sheetPresented = false
diff --git a/TalerWallet1/Views/Main/WalletEmptyView.swift 
b/TalerWallet1/Views/Main/WalletEmptyView.swift
index 2b41daa..1ec8cd7 100644
--- a/TalerWallet1/Views/Main/WalletEmptyView.swift
+++ b/TalerWallet1/Views/Main/WalletEmptyView.swift
@@ -9,7 +9,7 @@ import SymLog
 /// It is the very first thing the user sees after installing the app
 
 struct WalletEmptyView: View {
-    private let symLog = SymLogV()
+    private let symLog = SymLogV(0)
     @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
 
     var body: some View {
diff --git a/TalerWallet1/Views/Settings/SettingsView.swift 
b/TalerWallet1/Views/Settings/SettingsView.swift
index 94c88cf..247a1e8 100644
--- a/TalerWallet1/Views/Settings/SettingsView.swift
+++ b/TalerWallet1/Views/Settings/SettingsView.swift
@@ -18,7 +18,7 @@ import SymLog
  */
 
 struct SettingsView: View {
-    private let symLog = SymLogV()
+    private let symLog = SymLogV(0)
     let navTitle: String
 
     @AppStorage("developerMode") var developerMode: Bool = false

-- 
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]