evaluate @autoclosure before passing to existential

This commit is contained in:
Johannes Weiss committed 2018-11-30 21:36:59 +00:00
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? {