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
  • The ID that uniquely identifies the calling thread during its lifetime. After a thread dies, its ID is no longer meaningful; over time, thread IDs are recycled.

    Declaration

    Swift

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

    Declaration

    Swift

    public let timestamp: Date
  • The name by which the currently executing process is known to the operating system.

    Declaration

    Swift

    public let processName: String
  • The ID that uniquely identifies the executing process during its lifetime. After a process exits, its ID is no longer meaningful; over time, process IDs are recycled.

    Declaration

    Swift

    public let processID: Int32
  • 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 explicitly specified.