Logger

public protocol Logger

A logger protocol implemented by Logger implementations. This API is used by Kitura throughout its implementation when logging.

  • Output a logged message.

    Declaration

    Swift

    func log(_ type: LoggerMessageType, msg: String,
        functionName: String, lineNum: Int, fileName: String)

    Parameters

    type

    The type of the message (LoggerMessageType) being logged.

    msg

    The message to be logged.

    functionName

    The name of the function invoking the logger API.

    lineNum

    The line in the source code of the function invoking the logger API.

    fileName

    The file containing the source code of the function invoking the logger API.

  • Indicates if a message with a specified type (LoggerMessageType) will be in the logger output (i.e. will not be filtered out).

    Declaration

    Swift

    func isLogging(_ level: LoggerMessageType) -> Bool

    Parameters

    type

    The type of message (LoggerMessageType).

    Return Value

    A Boolean indicating whether a message of the specified type (LoggerMessageType) will be in the logger output.