mirror of
https://github.com/apple/swift-log
synced 2026-11-27 04:14:20 +00:00
evaluate @autoclosure before passing to existential
This commit is contained in:
1 parent
d756065630
commit
c5c893e7ff
2 files changed
+20
-12
No files matched your search
@@ -67,10 +67,8 @@ public final class ExampleLoggerImplementation: Logger {
|
||||
}
|
||||
}
|
||||
|
||||
public func _log(level: LogLevel, message: @autoclosure () -> String, file: String, function: String, line: UInt) {
|
||||
if level >= self.logLevel {
|
||||
print("\(self.formatter.string(from: Date())) \(self.formatLevel(level)): \(message())\(self.prettyContext)")
|
||||
}
|
||||
public func _log(level: LogLevel, message: String, file: String, function: String, line: UInt) {
|
||||
print("\(self.formatter.string(from: Date())) \(self.formatLevel(level)): \(message)\(self.prettyContext)")
|
||||
}
|
||||
|
||||
public subscript(diagnosticKey diagnosticKey: String) -> String? {
|
||||
|
||||
Reference in new issue
Block a user