From 34d2fa001639e2f8ff4557e2646194ce85877aee Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 24 Jun 2025 14:30:26 -0300 Subject: [PATCH] use logger --- plugins/log/ios/Sources/LogPlugin.swift | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/log/ios/Sources/LogPlugin.swift b/plugins/log/ios/Sources/LogPlugin.swift index d2491afb..1784e044 100644 --- a/plugins/log/ios/Sources/LogPlugin.swift +++ b/plugins/log/ios/Sources/LogPlugin.swift @@ -48,14 +48,10 @@ func flushLogs() { } func os_log(_ level: Int, _ message: NSString) { - os_log("%{public}@", log: OSLog.default, type: osLogType(from: level), message) -} - -func osLogType(from level: Int) -> OSLogType { switch level { - case 1: return .debug - case 2: return .info - case 3: return .error - default: return .default + case 1: Logger.debug(message as String) + case 2: Logger.info(message as String) + case 3: Logger.error(message as String) + default: break } }