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
messageLog message to process
logCategoryThe category of the log message
fileNameFile name where the log message is created
functionNameName of the function in which the log message is created
lineNumberLine 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
messageLog message to process
logCategoryThe category of the log message
fileNameFile name where the log message is created
functionNameName of the function in which the log message is created
lineNumberLine 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
messageLog message to process
logCategoryThe category of the log message
fileNameFile name where the log message is created
functionNameName of the function in which the log message is created
lineNumberLine 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
messageLog message to process
logCategoryThe category of the log message
fileNameFile name where the log message is created
functionNameName of the function in which the log message is created
lineNumberLine 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
messageLog message to process
logCategoryThe category of the log message
fileNameFile name where the log message is created
functionNameName of the function in which the log message is created
lineNumberLine number in the file in which the log message is created
LogService Class Reference