Files
8ba97a9cf5 Update documentation to reflect recent changes (#445)
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>
2026-04-17 09:12:32 +01:00

502 B

Logging/LogHandler

Topics

Sending log messages

  • log(event:)-7x67
  • log(event:)-17f2r
  • log(level:message:metadata:source:file:function:line:)-8kgt7
  • log(level:message:metadata:source:file:function:line:)-69pez
  • log(level:message:metadata:file:function:line:)-89rya
  • log(level:message:metadata:file:function:line:)-1xdau

Updating metadata

  • subscript(metadataKey:)

Inspecting a log handler

  • logLevel
  • metadata
  • metadataProvider