Skip to content

Commit

Permalink
fix: Change logger params to @autoclosures (#1827)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelkins authored Nov 21, 2024
1 parent ba5c7ba commit b506c48
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ class TestLogger: LogAgent {
self.level = level
}

func log(level: LogAgentLevel = .info, message: String, metadata: [String : String]? = nil, source: String = "ChecksumUnitTests", file: String = #file, function: String = #function, line: UInt = #line) {
messages.append((level: level, message: message))
func log(level: LogAgentLevel = .info, message: @autoclosure () -> String, metadata: @autoclosure () -> [String : String]? = nil, source: @autoclosure () -> String = "ChecksumUnitTests", file: String = #file, function: String = #function, line: UInt = #line) {
messages.append((level: level, message: message()))
}
}

Expand Down

0 comments on commit b506c48

Please sign in to comment.