LogRecord
public struct LogRecord
Describes an event to be logged.
-
Creates a
LogRecord.Declaration
Swift
public init(level: LogLevel, message: CustomStringConvertible, context: CustomStringConvertible?, timestamp: Date, file: String, function: String, line: Int)Parameters
levelthe log level that reflects the importance of the event
messagea message describing this event
contextthe context of the event, such as a session or connection identifier
timestampthe timestamp of the event
filethe name of the file that logged the event
functionthe name of the function that logged the event
linethe line number that logged the event
-
The log level that reflects the importance of the event.
Declaration
Swift
public let level: LogLevel -
A message describing this event.
Declaration
Swift
public let message: CustomStringConvertible -
The context of the event, such as a session or connection identifier.
Declaration
Swift
public let context: CustomStringConvertible? -
The timestamp of the event.
Declaration
Swift
public let timestamp: Date -
The name of the file that logged the event.
Declaration
Swift
public let file: String -
The name of the function that logged the event.
Declaration
Swift
public let function: String -
The line number that logged the event.
Declaration
Swift
public let line: Int