mirror of
https://github.com/apple/swift-log
synced 2026-11-23 03:44:22 +00:00
Update documentation to reflect recent changes ### Motivation: The documentation was not updated in SLG-0003 or SLG-0005. Concretely, the examples given in the documentation used the now deprecated multiparameter methods in `LogHandler`, and the new `LogEvent`-based method were not listed among the others. Likewise, the new logging methods (`Logger.trace` etc.) that take an `Error` as a parameter were not added. Lastly, `LogEvent` had no separate entry. While the default rendered docs for these were acceptable, it decreased the discoverability of the new methods, and the examples using deprecated methods were misleading. ### Modifications: * Update all code examples to use non-deprecated methods. * List all new methods on `Logger` and `LogHandler` along the existing ones. * Add a minimal file for `LogEvent` to give it the same look as all other types. * Update code examples in `.md` files to follow swift format. ### Result: Documentation reflects the current state and best practices of `swift-log`. --------- Co-authored-by: Joseph Heck <j_heck@apple.com> Co-authored-by: Vladimir Kukushkin <kukushechkin@mac.com>
375 B
375 B
Logging/MultiplexLogHandler
Topics
Creating a multiplex log handler
init(_:)init(_:metadataProvider:)
Sending log messages
log(event:)log(level:message:metadata:source:file:function:line:)
Updating metadata
subscript(metadataKey:)
Inspecting a log handler
logLevelmetadatametadataProvider