Skip to content

Commit

Permalink
Sendable context
Browse files Browse the repository at this point in the history
  • Loading branch information
samdeane committed Sep 13, 2024
1 parent fa9e177 commit 6babb2f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Sources/Logger/Context.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
// For licensing terms, see http://elegantchaos.com/license/liberal/.
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

/**
Encapsulates the context (function, line number, etc) in which the log statement was made.
*/

/// Encapsulates the context (function, line number, etc) in which the log statement was made.
public struct Context: CustomStringConvertible, Sendable {
let file: StaticString
let line: UInt
let function: StaticString
let column: UInt
let dso: UnsafeRawPointer
let dso: UInt

public init(
file: StaticString = #file, line: UInt = #line, column: UInt = #column,
Expand All @@ -23,7 +20,7 @@ public struct Context: CustomStringConvertible, Sendable {
self.line = line
self.function = function
self.column = column
self.dso = dso
self.dso = UInt(bitPattern: dso)
}

public var description: String {
Expand Down

0 comments on commit 6babb2f

Please sign in to comment.