Files
swift-log/Sources/Logging
Johannes Weiss dfffdaa429 remove Metadata.Value.lazy (#18)
Motivation:

Two reasons for the removal:

1. I don't see a compelling reason to add lazy metadata to the metadata
   storage. Lazy metadata makes sense if it's passed directly to a log
   method like

       logger.info("foo", metadata: somethingExpensive())

   but I don't think this makes a whole lot of sense

       logger[metadataKey: "foo"] = .lazy({ somethingExpensive() })

   why? It's very likely that it'll get evalutated because any next
   log message that gets logged will force it but it's totally
   unclear which one that'll be.

2. More importantly, the lazy metadata can't be implemented correctly
   because we can't memoize the result of the expensive computation
   because we can only mutate the `LogHandler` in mutating methods and
   the log methods aren't mutating.
2019-01-09 15:47:09 +00:00
..
2019-01-09 15:47:09 +00:00