fix(log): use Swift OSLog instead of oslog Rust binding (#262)

This commit is contained in:
Lucas Fernandes Nogueira
2023-02-23 09:17:15 -08:00
committed by GitHub
parent 22f987bf24
commit 961602bd1b
8 changed files with 117 additions and 89 deletions
+13
View File
@@ -0,0 +1,13 @@
import UIKit
import Tauri
import SwiftRs
@_cdecl("tauri_log")
func log(level: Int, message: UnsafePointer<SRString>) {
switch level {
case 1: Logger.debug(message.pointee.to_string())
case 2: Logger.info(message.pointee.to_string())
case 3: Logger.error(message.pointee.to_string())
default: break
}
}