LogInitiator

public protocol LogInitiator

Protocol to logging within some class. Allows to log class name as prefix automatically.

  • The name of initiator of log

    Declaration

    Swift

    var logInitiatorName: String { get }
  • Full prefix with name formatted for log message

    Declaration

    Swift

    var logInitiatorPrefix: String { get }
  • Calls by initiator to log DEBUG message accordingly to format..

    Declaration

    Swift

    func logDebug(_ format: String, args: CVarArg...)

    Parameters

    format

    A format string of message.

    args

    A list of arguments to substitute into format.

  • Calls by initiator to log WARNING message accordingly to format..

    Declaration

    Swift

    func logWarning(_ format: String, args: CVarArg...)

    Parameters

    format

    A format string of message.

    args

    A list of arguments to substitute into format.

  • Calls by initiator to log ERROR message accordingly to format..

    Declaration

    Swift

    func logError(_ format: String, args: CVarArg...)

    Parameters

    format

    A format string of message.

    args

    A list of arguments to substitute into format.

  • Calls by initiator to log message accordingly to format and level.

    Declaration

    Swift

    func log(_ level: TNLogLevel, format: String, args: [CVarArg])

    Parameters

    level

    level of log message.

    format

    A format string of message.

    args

    A list of arguments to substitute into format.

Available where Self: NSObject

  • logInitiatorName Default implementation

    Default Implementation

    Implementation of property from LogInitiator protocol Returns the name of initiator class.

    Declaration

    Swift

    var logInitiatorName: String { get }
  • logInitiatorPrefix Default implementation

    Default Implementation

    Implementation of property from LogInitiator protocol Returns the name with the colon for prefix.

    Declaration

    Swift

    var logInitiatorPrefix: String { get }
  • logDebug(_:args:) Default implementation

    Default Implementation

    Implementation of method from LogInitiator protocol Calls the self.log with DEBUG level and correspond parameters.

    Declaration

    Swift

    func logDebug(_ format: String, args: CVarArg...)
  • logWarning(_:args:) Default implementation

    Default Implementation

    Implementation of method from LogInitiator protocol Calls the self.log with WARNING level and correspond parameters.

    Declaration

    Swift

    func logWarning(_ format: String, args: CVarArg...)
  • logError(_:args:) Default implementation

    Default Implementation

    Implementation of method from LogInitiator protocol Calls the self.log with ERROR level and correspond parameters.

    Declaration

    Swift

    func logError(_ format: String, args: CVarArg...)
  • log(_:format:args:) Default implementation

    Default Implementation

    Implementation of method from LogInitiator protocol Calls the function Log with correspond parameters.

    Declaration

    Swift

    func log(_ level: TNLogLevel, format: String, args: [CVarArg])