Logger

@objc
public protocol Logger

Logger defines how to write logs for different logging level.

  • Emits any message if the log level is equal to or lower than default level.

    Declaration

    Swift

    func `default`(msg: String)
  • Calls debugFunction only if the log level is debug and emits the resulting string. Use the debug level to dump large or verbose messages that could slow down performance.

    Declaration

    Swift

    func debug(debugFunction: () -> String)
  • Emits an info message if the log level is equal to or lower than info level.

    Declaration

    Swift

    func info(msg: String)
  • Emits a fault message if the log level is equal to or lower than fault level.

    Declaration

    Swift

    func fault(msg: String)
  • Emits an error message if the log level is equal to or lower than error level.

    Declaration

    Swift

    func error(msg: String)
  • Sets the log level.

    Declaration

    Swift

    func setLogLevel(level: LogLevel)
  • Gets the current log level.

    Declaration

    Swift

    func getLogLevel() -> LogLevel