ConcatenatingLogFormatter
open class ConcatenatingLogFormatter: LogFormatter
The ConcatenatingLogFormatter lets you combine the output of multiple
LogFormatters by contatenating their output and returning the result.
-
The
LogFormatters whose output will be concatenated.Declaration
Swift
open let formatters: [LogFormatter] -
Initializes a new
ConcatenatingLogFormatterinstance.Declaration
Swift
public init(formatters: [LogFormatter])Parameters
formattersThe
LogFormatters whose output will be concatenated. -
Formats the
LogEntryby passing it to each of the receiver’sLogFormatters and concatenating the output.Declaration
Swift
open func format(_ entry: LogEntry) -> String?Parameters
entryThe
LogEntryto be formatted.Return Value
The formatted result, or
nilif none of the receiver’sformattersreturned a non-nilvalue when formattingentry.
View on GitHub
ConcatenatingLogFormatter Class Reference