Swiftpack.co - richardpiazza/Occurrence as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by richardpiazza.
richardpiazza/Occurrence 0.1.0
A swift logging library that integrates with `SwiftLog`
⭐️ 0
🕓 5 weeks ago
.package(url: "https://github.com/richardpiazza/Occurrence.git", from: "0.1.0")

Occurrence

A swift logging library that integrates with SwiftLog.

Twitter: @richardpiazza

Installation

Occurrence is distributed using the Swift Package Manager. To install it into a project, Use the Xcode 'Swift Packages' menu or add it as a dependency within your Package.swift manifest:

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/richardpiazza/Occurence.git", .upToNextMinor(from: "0.1.0"))
    ],
    ...
)

Then import the Occurrence packages wherever you'd like to use it:

import Occurrence

Usage

During you app initialization, call Occurrence.bootstrap(). This will configure the Swift LoggingSystem to use Occurrence as a LogHandler.

As a convenience to creating a Logger reference, use the LazyLogger property wrapper which will create a Logger with the specific label (Logger.Subsystem).

@LazyLogger("LoggerLabel") var logger: Logger

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.

Related Packages

Release Notes

Occurrence 0.1.0
5 weeks ago

Initial release which supports integration with SwiftLog, backed by a Core Data store.

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