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
tagprefix to be used for all messages logged through this Logr instance. If not provided, calling file name will be used as a tag.
serviceLogrService 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
messagemessage to be logged.
filefull file path where critical function was called.
functionname of the function where critical function was called.
lineline 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
messagemessage to be logged.
filefull file path where critical function was called.
functionname of the function where critical function was called.
lineline 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
messagemessage to be logged.
filefull file path where critical function was called.
functionname of the function where critical function was called.
lineline 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
messagemessage to be logged.
filefull file path where critical function was called.
functionname of the function where critical function was called.
lineline 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
messagemessage to be logged.
filefull file path where critical function was called.
functionname of the function where critical function was called.
lineline number where critical function was called.
View on GitHub
Logr Class Reference