XcodeLogFormatter

public final class XcodeLogFormatter: LogFormatter

A LogFormatter ideal for use within Xcode. This format is not well-suited for parsing.

  • Initializes a new XcodeLogFormatter instance.

    Declaration

    Swift

    public init(showCallSite: Bool = true)

    Parameters

    showCallSite

    If true, the source file and line indicating the call site of the log request will be added to formatted log messages.

  • Called to create a string representation of the passed-in LogEntry.

    Declaration

    Swift

    open func format(_ entry: LogEntry) -> String?

    Parameters

    entry

    The LogEntry to attempt to convert into a string.

    Return Value

    A String representation of entry, or nil if the receiver could not format the LogEntry.