mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-24 17:20:51 +02:00
fix(log): use Swift OSLog instead of oslog Rust binding (#262)
This commit is contained in:
committed by
GitHub
parent
22f987bf24
commit
961602bd1b
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user