You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tauri-plugins-workspace/plugins/log/ios/Sources/LogPlugin.swift

14 lines
313 B

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
}
}