Skip to content

Commit

Permalink
Add a public initializer to LogRecord (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
semicoleon authored Nov 18, 2023
1 parent 7d0898e commit 2e3e205
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Sources/ConsoleKit/Utilities/LoggerFragment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ import WASILibc

/// Information about a specific log message, including information from the logger the message was logged to.
public struct LogRecord {
public init(level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata? = nil, source: String, file: String, function: String, line: UInt, label: String, loggerLevel: Logger.Level, loggerMetadata: Logger.Metadata, metadataProvider: Logger.MetadataProvider? = nil) {
self.level = level
self.message = message
self.metadata = metadata
self.source = source
self.file = file
self.function = function
self.line = line
self.label = label
self.loggerLevel = loggerLevel
self.loggerMetadata = loggerMetadata
self.metadataProvider = metadataProvider
}

/// The log level of the message
public var level: Logger.Level
/// The logged message
Expand Down

0 comments on commit 2e3e205

Please sign in to comment.