mirror of
https://github.com/apple/swift-log
synced 2026-11-23 03:44:22 +00:00
Motivation:
Logger had two ways to access the metadata:
logger[metadataKey: "foo"] = "bar"
and
logger.metadata["foo"] = "bar"
. The first one is the preferred API (as it doesn't force the
`LogHandler`s to store it in a dictionary) but the second one was still
available for cases where you need to import/export the whole metadata
storage.
Instead of exposing this as a dictionary, we should make the
'whole-metadata import/export' opaque. We're close to tagging 1.0.0
however let's design this API properly and add a sensible implementation
for 1.1.0 or so.
Moditications:
remove `Logger.metadata` property
Result:
- We can design the import/export APIs and add them when they're ready.
- the `LogHandler` API is unchanged