LogEntry

public struct LogEntry

Represents an entry to be written to the log.

  • Represents the payload contained within a log entry.

    See more

    Declaration

    Swift

    public enum Payload
  • The payload of the log entry.

    Declaration

    Swift

    public let payload: Payload
  • The severity of the log entry.

    Declaration

    Swift

    public let severity: LogSeverity
  • The path of the source file containing the calling function that issued the log request.

    Declaration

    Swift

    public let callingFilePath: String
  • The line within the source file at which the log request was issued.

    Declaration

    Swift

    public let callingFileLine: Int
  • The stack frame signature of the caller that issued the log request.

    Declaration

    Swift

    public let callingStackFrame: String
  • A numeric identifier for the calling thread. Note that thread IDs are recycled over time.

    Declaration

    Swift

    public let callingThreadID: UInt64
  • The time at which the LogEntry was created.

    Declaration

    Swift

    public let timestamp: Date
  • LogEntry initializer.

    Declaration

    Swift

    public init(payload: Payload, severity: LogSeverity, callingFilePath: String, callingFileLine: Int, callingStackFrame: String, callingThreadID: UInt64, timestamp: Date = Date())

    Parameters

    payload

    The payload of the LogEntry being constructed.

    severity

    The LogSeverity of the message being logged.

    callingFilePath

    The path of the source file containing the calling function that issued the log request.

    callingFileLine

    The line within the source file at which the log request was issued.

    callingStackFrame

    The stack frame signature of the caller that issued the log request.

    callingThreadID

    A numeric identifier for the calling thread. Note that thread IDs are recycled over time.

    timestamp

    The time at which the log entry was created. Defaults to the current time if not specified.