From 395c8202c616b5b3fa097ce6f7aecc60bdd80273 Mon Sep 17 00:00:00 2001 From: Hwee-Boon Yar Date: Wed, 29 May 2024 12:19:28 +0800 Subject: [PATCH] Switch from NSLog to os.log for AlphaWalletAttestation --- .../AlphaWalletAttestation/Logger.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/AlphaWalletAttestation/AlphaWalletAttestation/Logger.swift b/modules/AlphaWalletAttestation/AlphaWalletAttestation/Logger.swift index 9a67057c4..beefbae8f 100644 --- a/modules/AlphaWalletAttestation/AlphaWalletAttestation/Logger.swift +++ b/modules/AlphaWalletAttestation/AlphaWalletAttestation/Logger.swift @@ -1,13 +1,16 @@ // Copyright © 2023 Stormbird PTE. LTD. import Foundation +import os.log + +private let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "attestation") func infoLog(_ message: Any, callerFunctionName: String = #function) { guard Attestation.isLoggingEnabled else { return } - NSLog("\(message) from: \(callerFunctionName)") + logger.info("\(String(describing: message)) from: \(callerFunctionName)") } func errorLog(_ message: Any, callerFunctionName: String = #function) { guard Attestation.isLoggingEnabled else { return } - NSLog("\(message) from: \(callerFunctionName)") + logger.error("\(String(describing: message)) from: \(callerFunctionName)") }