remove error argument from logging API (#34)

motivation: since Error in swift does not carry any additional information (such as stack traces) that can be useful in formatting decision the LogHandler may need to do, there is no real reason to treat it as special in the API, and it can just be "strigified" at the calling site

changes: remove error params from all APIs
This commit is contained in:
tomer doron authored and Johannes Weiss committed 2019-02-22 18:02:14 +00:00
1 parent 9bd90f06ba
commit 045ba36718
7 files changed
+39 -82

No files matched your search

@@ -19,8 +19,8 @@ public struct SimpleLogHandler: LogHandler {
self.defaultLogLevel = defaultLogLevel
}
public func log(level: Logger.Level, message: String, metadata: Logger.Metadata?, error: Error?, file: StaticString, function: StaticString, line: UInt) {
self.handler.log(level: level, message: message, metadata: metadata, error: error) { text in
public func log(level: Logger.Level, message: String, metadata: Logger.Metadata?, file: StaticString, function: StaticString, line: UInt) {
self.handler.log(level: level, message: message, metadata: metadata) { text in
print(text)
}
}