CallSiteLogFormatter

public struct CallSiteLogFormatter: LogFormatter

A LogFormatter that returns a string representation of the LogEntry‘s call site, consisting of the last path component of the callingFilePath followed by the callingFileLine within that file.

This is typically combined with other LogFormatters within a ConcatenatingLogFormatter.

  • The initializer.

    Declaration

    Swift

    public init()
  • Formats the passed-in LogEntry by returning a string representation of the call site specified by its callingFilePath and callingFileLine properties.

    Declaration

    Swift

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

    Return Value

    The formatted result; never nil.