PayloadLogFormatter

public struct PayloadLogFormatter: LogFormatter

A LogFormatter that returns a string representation of a LogEntry’s payload property.

This is typically combined with other LogFormatters within a ConcatenatingLogFormatter.

  • Class initializer.

    Declaration

    Swift

    public init()
  • Formats the passed-in LogEntry by returning a string representation of its payload property.

    Declaration

    Swift

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

    Parameters

    entry

    The LogEntry to be formatted.

    Return Value

    The formatted result; never nil.