PayloadValueLogFormatter

public struct PayloadValueLogFormatter: LogFormatter

A LogFormatter that returns the message content of a LogEntry whose payload is a .value value.

  • The 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 message content, or nil if entry doesn’t have a payload with a .value value.