Swiftpack.co -  chrisaljoudi/swift-log-oslog as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
chrisaljoudi/swift-log-oslog
OSLog (aka Unified Logging) backend for Apple’s SwiftLog
.package(url: "https://github.com/chrisaljoudi/swift-log-oslog.git", from: "0.2.2")

LoggingOSLog

OSLog logging backend for swift-log.

Getting Started

If you're adding through Xcode's Swift Package Manager integration (Xcode 11 and higher), you can simply use:

https://github.com/chrisaljoudi/swift-log-oslog.git

And use 0.2.1 as the base version. If adding as a dependency in your Package.swift:

.package(url: "https://github.com/chrisaljoudi/swift-log-oslog.git", .from("0.2.1"))

Usage

During app startup/initialization:

import Logging
import LoggingOSLog

/// Configure `swift-log` logging system to use OSLog backend
LoggingSystem.bootstrap(LoggingOSLog.init)

Then use swift-log per usual, for example:

let logger = Logger(label: "com.yourcompany.yourawesomeapp")

/// ...

logger.info("Unified Logging is pretty cool.")

For more details on all the features of the Swift Logging API, check out the swift-log repo.

GitHub

link
Stars: 63
Last commit: 51 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Dependencies

Release Notes

swift-log-oslog 0.2.2
51 weeks ago

What‘s new

  • Xcode 12 compatibility and warning fixes (#10—thanks, mRs-!)

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