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
message
The message to be logger. Provided as a closure to avoid performing interpolation if the message is not going to be logged.
level
The severity of the message. A logger can use this flag to decide if to log or ignore this specific message.
file
The file name of the file where the message was created.
function
The function name where the message was created.
line
The 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
message
The message to be logger. Provided as a closure to avoid performing interpolation if the message is not going to be logged.
level
The severity of the message. A logger can use this flag to decide if to log or ignore this specific message.
file
The file name of the file where the message was created.
function
The function name where the message was created.
line
The line number in the file where the message was created.
-
Set new log level.
Declaration
Swift
func setLogLevel(_ logLevel: RxBluetoothKitLog.LogLevel)
Parameters
logLevel
New log level to be applied.
-
Get current log level.
Declaration
Swift
func getLogLevel() -> RxBluetoothKitLog.LogLevel
Return Value
Currently set log level.