Repository navigation
What's Changed
Highlights
- swift-log backend. The new opt-in
SwiftLogSmithBackendproduct as a swift-log backend, which routes everyLogger(label:)in the process (including loggers inside third-party dependencies) into the SwiftLogSmith destinations with one call:LoggingSystem.bootstrapWithLogSmith(). It requires Swift 6.2+. - Structured payloads. The new
LogPayloadprotocol andLogMessage.payload, with an optionalpayload:parameter onLogManager.logand everyLogSmith.log*function to pass on any structured data (which is not natively supported by the library) into anyILoggercompatible classes. One such example isSwiftLogPayloadclass for swift-log structured context.
Breaking changes
fileIdandfunctionare nowString, notStaticString. Wrappers that forward aStaticStringmust change their parameters toString.LogTypeandLogLevelraw values changed to order them by severity. Also,LogLevel.defaultis nowLogLevel.all, andLogLevel.undefinedis removed. Check any code or stored configuration that persists raw values.
Fixes & Improvements
- Fixed the public access of a library API.
- Improved external invalid value handling in the library to avoid crashes.
- Sorted the metadata by key in default format, to avoid its variance between different logger outputs (for the same log call).
Full Changelog: v1.1.0...v2.0.0