Swiftpack.co - ericlewis/swift-log-sentry as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by ericlewis.
ericlewis/swift-log-sentry 1.0.0
Sentry logging backend for SwiftLog
⭐️ 0
🕓 2 days ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/ericlewis/swift-log-sentry.git", from: "1.0.0")

SwiftLogSentry

Build & Test

A Sentry logging backend for SwiftLog, it works by creating and adding a Breadcrumb for log events.

Features

  • 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.

Getting started

Before using the logger you need to initialize the Sentry SDK.

Adding the dependency

SwiftLogSentry is designed for Swift 5. To use the handler, you need to declare your dependency in your Package.swift:

.package(url: "https://github.com/ericlewis/swift-log-sentry.git", from: "0.1.0"),

and to your application/library target, add "SentryLogHandler" to your dependencies, e.g. like this:

.target(name: "BestExampleApp", dependencies: [
    .product(name: "SentryLogHandler", package: "swift-log-sentry")
],

License

This library is released under the MIT license. See LICENSE for details.

GitHub

link
Stars: 0
Last commit: 2 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics