A Sentry logging backend for SwiftLog, it works by creating and adding a Breadcrumb for log events.
This is a maintained fork of ericlewis/swift-log-sentry.
This fork bumped up
sentry-cocoato 8.x, targets latest SwiftLog interface and is now fully compatible with Swift 6 Language Mode. Library name is also updated toLoggingSentryto be more in-line with other SwiftLog backends.
- Supports metadata by inserting the key value pairs in the data property on a Breadcrumb.
- Log levels roughly map with minor differences.
- Supports line, file, and function reporting via the data property.
- 100% test coverage.
Before using the logger you need to initialize the Sentry SDK.
SwiftLogSentry is fully Swift 6 compatible and is also available for Swift 5. To use the handler, you need to declare your dependency in your Package.swift:
.package(url: "https://github.com/laosb/swift-log-sentry.git", from: "1.0.0"),and to your application/library target, add "LoggingSentry" to your dependencies, e.g. like this:
.target(name: "BestExampleApp", dependencies: [
.product(name: "LoggingSentry", package: "swift-log-sentry")
],This library is released under the MIT license. See LICENSE for details.