Skip to content

Release v2.0.0

Latest

Choose a tag to compare

@eeshanjamal eeshanjamal released this 23 Oct 13:36
2f73faf

What's Changed

Highlights

  • swift-log backend. The new opt-in SwiftLogSmithBackend product as a swift-log backend, which routes every Logger(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 LogPayload protocol and LogMessage.payload, with an optional payload: parameter on LogManager.log and every LogSmith.log* function to pass on any structured data (which is not natively supported by the library) into any ILogger compatible classes. One such example is SwiftLogPayload class for swift-log structured context.

Breaking changes

  • fileId and function are now String, not StaticString. Wrappers that forward a StaticString must change their parameters to String.
  • LogType and LogLevel raw values changed to order them by severity. Also, LogLevel.default is now LogLevel.all, and LogLevel.undefined is 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