ConcatenatingLogFormatter
open class ConcatenatingLogFormatter: LogFormatter
The ConcatenatingLogFormatter
lets you combine the output of multiple
LogFormatter
s by contatenating their output and returning the result.
-
The
LogFormatter
s whose output will be concatenated.Declaration
Swift
open let formatters: [LogFormatter]
-
Initializes a new
ConcatenatingLogFormatter
instance.Declaration
Swift
public init(formatters: [LogFormatter])
Parameters
formatters
The
LogFormatter
s whose output will be concatenated. -
Formats the
LogEntry
by passing it to each of the receiver’sLogFormatter
s and concatenating the output.Declaration
Swift
open func format(_ entry: LogEntry) -> String?
Parameters
entry
The
LogEntry
to be formatted.Return Value
The formatted result, or
nil
if none of the receiver’sformatters
returned a non-nil
value when formattingentry
.