gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 03/35: logging


From: gnunet
Subject: [taler-taler-ios] 03/35: logging
Date: Thu, 27 Jul 2023 09:09:36 +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 134c582004a86bbb4fe8d1942bf410e341884661
Author: Marc Stibane <marc@taler.net>
AuthorDate: Mon Jul 10 13:03:17 2023 +0200

    logging
---
 TalerWallet1/Controllers/Controller.swift | 3 +++
 TalerWallet1/Helper/playSound.swift       | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/TalerWallet1/Controllers/Controller.swift 
b/TalerWallet1/Controllers/Controller.swift
index 7f08bd2..96e1fef 100644
--- a/TalerWallet1/Controllers/Controller.swift
+++ b/TalerWallet1/Controllers/Controller.swift
@@ -5,6 +5,7 @@
 import Foundation
 import SwiftUI
 import SymLog
+import os.log
 
 enum BackendState {
     case none
@@ -29,6 +30,7 @@ class Controller: ObservableObject {
 
     @Published var backendState: BackendState = .none       // only used for 
launch animation
     @AppStorage("playSounds") var playSounds: Bool = false  // extension 
mustn't define this, so it must be here
+    let logger = Logger (subsystem: "net.taler.gnu", category: "Controller")
 
     var messageForSheet: String? = nil
 
@@ -59,6 +61,7 @@ class Controller: ObservableObject {
 // MARK: -
 extension Controller {
     func openURL(_ url:URL) -> UrlCommand {
+        symLog.log(url)
         guard let scheme = url.scheme else {return UrlCommand.unknown}
         var uncrypted = false
         switch scheme {
diff --git a/TalerWallet1/Helper/playSound.swift 
b/TalerWallet1/Helper/playSound.swift
index ed39bef..834fe0b 100644
--- a/TalerWallet1/Helper/playSound.swift
+++ b/TalerWallet1/Helper/playSound.swift
@@ -11,7 +11,8 @@ extension Controller {
         var soundID: SystemSoundID = 0
         if number < 999 {
             let sound = (number == 0) ? "payment_failure" :
-            (number == 1) ? "payment_success" : "PaymentReceived"
+                        (number == 1) ? "payment_success" : "PaymentReceived"
+            logger.log("\(sound, privacy: .public)")
             let fileURL = URL(fileURLWithPath: 
"/System/Library/Audio/UISounds/"
                               + sound + ".caf")
             AudioServicesCreateSystemSoundID(fileURL as CFURL, &soundID)

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