Logger

public protocol Logger : LogWriter

An object which represents a logging context for some area, for example, all the log messages for a given class

  • Controls the log level for this specific logger instance

    Declaration

    Swift

    var level: LogLevel { get set }
  • Writes an error to the log

    Declaration

    Swift

    func fatal(_ message: @autoclosure () -> String, function: String = #function, file: String = #file, line: Int = #line, className: String? = nil)

    Parameters

    message

    autoclosure to produce the log message string

  • Writes an error to the log

    Declaration

    Swift

    func error(_ message: @autoclosure () -> String, function: String = #function, file: String = #file, line: Int = #line, className: String? = nil)

    Parameters

    message

    autoclosure to produce the log message string

  • Writes a warning to the log

    Declaration

    Swift

    func warn(_ message: @autoclosure () -> String, function: String = #function, file: String = #file, line: Int = #line, className: String? = nil)

    Parameters

    message

    autoclosure to produce the log message string

  • Writes an informational message to the log

    Declaration

    Swift

    func info(_ message: @autoclosure () -> String, function: String = #function, file: String = #file, line: Int = #line, className: String? = nil)

    Parameters

    message

    autoclosure to produce the log message string

  • Writes a debug message to the log

    Declaration

    Swift

    func debug(_ message: @autoclosure () -> String, function: String = #function, file: String = #file, line: Int = #line, className: String? = nil)

    Parameters

    message

    autoclosure to produce the log message string

  • Writes a verbose message to the log

    Declaration

    Swift

    func verbose(_ message: @autoclosure () -> String, function: String = #function, file: String = #file, line: Int = #line, className: String? = nil)

    Parameters

    message

    autoclosure to produce the log message string