Logger
public protocol Logger
Simple logging interface.
An application that wants RxBluetoothKit to use its logging solution will
need to provide a type that conforms to this signature and assign it to
RxBluetoothKitLogger.defaultLogger.
-
Logs the given message (using StaticString parameters).
Declaration
Swift
func log( _ message: @autoclosure () -> String, level: RxBluetoothKitLog.LogLevel, file: StaticString, function: StaticString, line: UInt )Parameters
messageThe message to be logger. Provided as a closure to avoid performing interpolation if the message is not going to be logged.
levelThe severity of the message. A logger can use this flag to decide if to log or ignore this specific message.
fileThe file name of the file where the message was created.
functionThe function name where the message was created.
lineThe line number in the file where the message was created.
-
Logs the given message (using regular String parameters).
Declaration
Swift
func log( _ message: @autoclosure () -> String, level: RxBluetoothKitLog.LogLevel, file: String, function: String, line: UInt )Parameters
messageThe message to be logger. Provided as a closure to avoid performing interpolation if the message is not going to be logged.
levelThe severity of the message. A logger can use this flag to decide if to log or ignore this specific message.
fileThe file name of the file where the message was created.
functionThe function name where the message was created.
lineThe line number in the file where the message was created.
-
Set new log level.
Declaration
Swift
func setLogLevel(_ logLevel: RxBluetoothKitLog.LogLevel)Parameters
logLevelNew log level to be applied.
-
Get current log level.
Declaration
Swift
func getLogLevel() -> RxBluetoothKitLog.LogLevelReturn Value
Currently set log level.
View on GitHub
Logger Protocol Reference