CallingThreadLogFormatter

public struct CallingThreadLogFormatter: LogFormatter

A LogFormatter that returns a string representation of a LogEntry‘s callingThreadID.

This is typically combined with other LogFormatters within a ConcatenatingLogFormatter.

  • Governs how the receiver represents callingThreadIDs.

    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 its callingThreadID. The format is governed by the value of the receiver’s style property.

    Declaration

    Swift

    public func format(_ entry: LogEntry)
            -> String?

    Parameters

    entry

    The LogEntry to format.

    Return Value

    The formatted result; never nil.