Switch from NSLog to os.log for AlphaWalletAttestation

pull/7097/merge
Hwee-Boon Yar 5 months ago
parent 711c6db98d
commit 395c8202c6
  1. 7
      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)")
}

Loading…
Cancel
Save