mirror of
https://github.com/apple/swift-log
synced 2026-11-29 04:14:22 +00:00
add support for local metadata (#16)
motivation: allow users to define metadata at the log API call site changes: add metadata param to all log APIs, and implement merge at our example implementations
This commit is contained in:
1 parent
5ca706eb48
commit
a0c3ceabdf
7 files changed
+55
-37
No files matched your search
@@ -26,8 +26,8 @@ public final class ConfigLogging {
|
||||
self.config = config
|
||||
}
|
||||
|
||||
public func log(level: Logging.Level, message: String, error: Error?, file: StaticString, function: StaticString, line: UInt) {
|
||||
self.logger.log(level: level, message: message, error: error) { text in
|
||||
public func log(level: Logging.Level, message: String, metadata: Logging.Metadata?, error: Error?, file: StaticString, function: StaticString, line: UInt) {
|
||||
self.logger.log(level: level, message: message, metadata: metadata, error: error) { text in
|
||||
print(text)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user