Log

public protocol Log

Simple log interface to allow implementations as preferred.

Author

Zendesk
  • Log an event.

    Declaration

    Swift

    func logit(file: StaticString,
               line: Int,
               function: StaticString, level: LogLevel, error: Error?, msg: String, args: [CVarArg])

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    level

    the log level being printed

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

Log protocol

  • Declaration

    Swift

    func logit(file: StaticString = #filePath,
               line: Int = #line,
               function: StaticString = #function,
               logLevel: LogLevel,
               error: Error? = nil,
               _ msg: String,
               _ args: CVarArg...)
  • Log an info message.

    Declaration

    Swift

    func i(file: StaticString = #filePath,
           line: Int = #line,
           function: StaticString = #function, error: Error? = nil,
           _ msg: String,
           _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

  • Log a verbose message.

    Declaration

    Swift

    func v(file: StaticString = #filePath,
           line: Int = #line,
           function: StaticString = #function, error: Error? = nil, _ msg: String, _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

  • Log a debug message.

    Declaration

    Swift

    func d(file: StaticString = #filePath,
           line: Int = #line,
           function: StaticString = #function, error: Error? = nil, _ msg: String, _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

  • Log a warn message.

    Declaration

    Swift

    func w(file: StaticString = #filePath,
           line: Int = #line,
           function: StaticString = #function, error: Error? = nil, _ msg: String, _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

  • Log an error message.

    Declaration

    Swift

    func e(file: StaticString = #filePath,
           line: Int = #line,
           function: StaticString = #function, error: Error? = nil, _ msg: String, _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

  • Log an info message.

    Declaration

    Swift

    func debugI(file: StaticString = #filePath,
                line: Int = #line,
                function: StaticString = #function, error: Error? = nil,
                _ msg: String,
                _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

  • Log a verbose message.

    Declaration

    Swift

    func debugV(file: StaticString = #filePath,
                line: Int = #line,
                function: StaticString = #function, error: Error? = nil, _ msg: String, _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

  • Log a debug message.

    Declaration

    Swift

    func debugD(file: StaticString = #filePath,
                line: Int = #line,
                function: StaticString = #function, error: Error? = nil, _ msg: String, _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

  • Log a warn message.

    Declaration

    Swift

    func debugW(file: StaticString = #filePath,
                line: Int = #line,
                function: StaticString = #function, error: Error? = nil, _ msg: String, _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message

  • Log an error message.

    Declaration

    Swift

    func debugE(file: StaticString = #filePath,
                line: Int = #line,
                function: StaticString = #function, error: Error? = nil, _ msg: String, _ args: CVarArg...)

    Parameters

    file

    the file making the call

    line

    the line in the file making this call

    function

    the function making this call

    error

    the error if one is being reported

    msg

    the log message

    args

    arguments for the log message