Logr
open class Logr
Proxy class used to pass log messages to underlying service.
-
LogrServiice instance assigned during initialization. Defaults to main LogrService instance.
Declaration
Swift
public let service: LogrService
-
Tag assinged during initialization. Used as a prefix for all log messages. Helps to categorize/group messages.
Declaration
Swift
public let tag: String
-
Initializes new instance of Logr.
Declaration
Swift
public init(_ tag: String = #file, _ service: LogrService? = nil)
Parameters
tag
prefix to be used for all messages logged through this Logr instance. If not provided, calling file name will be used as a tag.
service
LogrService to which pass logging messages.
-
Logs debug type of message to the service.
Declaration
Swift
open func debug(_ message: String, _ file: String = #file, _ function: String = #function, line: Int = #line)
Parameters
message
message to be logged.
file
full file path where critical function was called.
function
name of the function where critical function was called.
line
line number where critical function was called.
-
Logs info type of message to the service.
Declaration
Swift
open func info(_ message: String, _ file: String = #file, _ function: String = #function, line: Int = #line)
Parameters
message
message to be logged.
file
full file path where critical function was called.
function
name of the function where critical function was called.
line
line number where critical function was called.
-
Logs warn type of message to the service.
Declaration
Swift
open func warn(_ message: String, _ file: String = #file, _ function: String = #function, line: Int = #line)
Parameters
message
message to be logged.
file
full file path where critical function was called.
function
name of the function where critical function was called.
line
line number where critical function was called.
-
Logs error type of message to the service.
Declaration
Swift
open func error(_ message: String, _ file: String = #file, _ function: String = #function, line: Int = #line)
Parameters
message
message to be logged.
file
full file path where critical function was called.
function
name of the function where critical function was called.
line
line number where critical function was called.
-
Logs critical type of message to the service.
Declaration
Swift
open func critical(_ message: String, _ file: String = #file, _ function: String = #function, line: Int = #line)
Parameters
message
message to be logged.
file
full file path where critical function was called.
function
name of the function where critical function was called.
line
line number where critical function was called.