PayloadMessageLogFormatter
public struct PayloadMessageLogFormatter: LogFormatter
A LogFormatter
that returns the message content of a LogEntry
whose
payload
is a .message
value.
-
The initializer.
Declaration
Swift
public init()
-
Formats the passed-in
LogEntry
by returning a string representation of itspayload
property.Declaration
Swift
public func format(_ entry: LogEntry) -> String?
Parameters
entry
The
LogEntry
to be formatted.Return Value
The message content, or
nil
ifentry
doesn’t have apayload
with a.message
value.