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

18 lines
410 B

// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import UIKit
import Tauri
import SwiftRs
@_cdecl("tauri_log")
func log(level: Int, message: NSString) {
switch level {
case 1: Logger.debug(message as String)
case 2: Logger.info(message as String)
case 3: Logger.error(message as String)
default: break
}
}