LogService
public final class LogService
Log service
Responsible for distributing the log messages to the log providers
-
Singleton instance of the log service
Declaration
Swift
public static let shared: LogService
-
Undocumented
Declaration
Swift
public static func register(logProviders: LogProvider...)
-
Undocumented
Declaration
Swift
public static func unregisterAll()
-
Create an info type log message
Declaration
Swift
public func info(_ message: @escaping @autoclosure () -> Any?, logCategory: KeyPath<LogCategories, LogCategory> = \.default, fileName: StaticString = #file, functionName: StaticString = #function, lineNumber: Int = #line )
Parameters
message
Log message to process
logCategory
The category of the log message
fileName
File name where the log message is created
functionName
Name of the function in which the log message is created
lineNumber
Line number in the file in which the log message is created
-
Create a debug type log message
Declaration
Swift
public func debug(_ message: @escaping @autoclosure () -> Any?, logCategory: KeyPath<LogCategories, LogCategory> = \.default, fileName: StaticString = #file, functionName: StaticString = #function, lineNumber: Int = #line )
Parameters
message
Log message to process
logCategory
The category of the log message
fileName
File name where the log message is created
functionName
Name of the function in which the log message is created
lineNumber
Line number in the file in which the log message is created
-
Create a verbose type log message
Declaration
Swift
public func verbose(_ message: @escaping @autoclosure () -> Any?, logCategory: KeyPath<LogCategories, LogCategory> = \.default, fileName: StaticString = #file, functionName: StaticString = #function, lineNumber: Int = #line )
Parameters
message
Log message to process
logCategory
The category of the log message
fileName
File name where the log message is created
functionName
Name of the function in which the log message is created
lineNumber
Line number in the file in which the log message is created
-
Create a warning type log message
Declaration
Swift
public func warning(_ message: @escaping @autoclosure () -> Any?, logCategory: KeyPath<LogCategories, LogCategory> = \.default, fileName: StaticString = #file, functionName: StaticString = #function, lineNumber: Int = #line )
Parameters
message
Log message to process
logCategory
The category of the log message
fileName
File name where the log message is created
functionName
Name of the function in which the log message is created
lineNumber
Line number in the file in which the log message is created
-
Create an error type log message
Declaration
Swift
public func error(_ message: @escaping @autoclosure () -> Any?, logCategory: KeyPath<LogCategories, LogCategory> = \.default, fileName: StaticString = #file, functionName: StaticString = #function, lineNumber: Int = #line )
Parameters
message
Log message to process
logCategory
The category of the log message
fileName
File name where the log message is created
functionName
Name of the function in which the log message is created
lineNumber
Line number in the file in which the log message is created