CallingThreadLogFormatter
public struct CallingThreadLogFormatter: LogFormatter
A LogFormatter
that returns a string representation of a LogEntry
‘s
callingThreadID
.
This is typically combined with other LogFormatter
s within a
ConcatenatingLogFormatter
.
-
Governs how the receiver represents
callingThreadID
s.Declaration
Swift
public let style: CallingThreadStyle
-
The
CallingThreadLogFormatter
initializer.Declaration
Swift
public init(style: CallingThreadStyle = .hex)
-
Formats the passed-in
LogEntry
by returning a string representation of itscallingThreadID
. The format is governed by the value of the receiver’sstyle
property.Declaration
Swift
public func format(_ entry: LogEntry) -> String?
Parameters
entry
The
LogEntry
to format.Return Value
The formatted result; never
nil
.