LogRecord
public struct LogRecord
LogRecord objects are used to pass logging requests between the logging framework and individual log Handlers.
-
the name of the logger that logged this record.
Declaration
Swift
public let loggerName: String -
Represents the chosen log level for this log.
Declaration
Swift
public let logLevel: LogLevel -
Point in time where this log got created.
Declaration
Swift
public let date: Date -
The message provided by the one who wants to log something.
Declaration
Swift
public let logMessage: String -
The name of the function where the logging was triggered
Declaration
Swift
public let function: String -
The name and path of the file where logging was triggered
Declaration
Swift
public let file: String -
The line in the file where logging was triggered
Declaration
Swift
public let line: Int -
Error which occured passed to the logging framework, might be nil
Declaration
Swift
public let error: Error? -
Thread name where the logging was triggered
Declaration
Swift
public let thread: String -
GUID that describes one request/response flow
Declaration
Swift
public let correlationId: String?
-
Construct a LogRecord with the given parameters.
Declaration
Swift
public init(loggerName: String, logLevel: LogLevel, date: Date, logMessage: String, function: String, file: String, line: Int, error: Error?, thread: String, correlationId: String? = nil)Parameters
logLevelRepresents the chosen log level for this log.
datePoint in time where this log got created.
logMessageThe message provided by the one who wants to log something.
functionThe name of the function where the logging was triggered
fileThe name of the file where logging was triggered
lineThe line in the file where logging was triggered
errorError which occured passed to the logging framework, might be nil
threadThread name where the logging was triggered
correlationIdOptional parameter. GUID that describes one request/response flow.