Skip to content

1.2.1

Latest
Compare
Choose a tag to compare
@Jeehut Jeehut released this 04 Jun 11:03
· 4 commits to main since this release

Adding Logger Conveniences

Since string interpolation (added in 1.2.0) only works where a String is expected, the last release doesn't help with Logger where OSLogMessage is expected. This version introduces convenience APIs so the errorChainDescription can be easily printed in those cases.

For OSLog/Logger there are now dedicated convenience overloads taking a second error parameter:

// Instead of:
Logger().error("Update failed:\n\(ErrorKit.errorChainDescription(for: error))")

// You can simply use overloads like:
Logger().error("Update failed", error: error)
Logger().warning("Update failed", error: error)

Note that there's no need to add a colon (:) or newline (\n) to the message, they will be added automatically.

Full Changelog: 1.2.0...1.2.1