mirror of
https://github.com/apple/swift-log
synced 2026-11-30 04:18:44 +00:00
Fix function being dropped on source-less trace (#185)
Motivation: When using the recently re-introduced source-less version of trace, the function parameter that reaches the underlying LogHandler is wrong. Modifications: Pass the function parameter to trace with source parameter. Result: With these changes, the function parameter that reaches the underlying LogHandler has the correct value.
This commit is contained in:
1 parent
c7988420c2
commit
6225a9b188
1 file changed
+1
-1
@@ -176,7 +176,7 @@ extension Logger {
|
||||
public func trace(_ message: @autoclosure () -> Logger.Message,
|
||||
metadata: @autoclosure () -> Logger.Metadata? = nil,
|
||||
file: String = #file, function: String = #function, line: UInt = #line) {
|
||||
self.trace(message(), metadata: metadata(), source: nil, file: file, line: line)
|
||||
self.trace(message(), metadata: metadata(), source: nil, file: file, function: function, line: line)
|
||||
}
|
||||
|
||||
/// Log a message passing with the `Logger.Level.debug` log level.
|
||||
|
||||
Reference in new issue
Block a user