LoggerPluginImpl
public class LoggerPluginImpl : NSObject, LoggerPlugin, @unchecked Sendable
日志插件管理器,默认使用NSLog
-
单例模式对象
Declaration
Swift
@objc(sharedInstance) public static let shared: LoggerPluginImpl
-
初始化方法,默认使用NSLog
Declaration
Swift
override public init()
-
添加日志插件,并在指定等级生效(默认all)
Declaration
Swift
public func addLogger(_ logger: LoggerPlugin, level: LogLevel = .all)
-
移除指定日志插件
Declaration
Swift
public func removeLogger<T>(_ logger: T) where T : LoggerPlugin, T : Equatable
-
移除所有的日志插件
Declaration
Swift
public func removeAllLoggers()
-
记录日志协议方法
Declaration
Swift
public func log(_ type: LogType, group: String, message: String)