Swiftpack.co -  ianpartridge/swift-log-syslog as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
ianpartridge/swift-log-syslog
📋 Syslog logging for Swift
.package(url: "https://github.com/ianpartridge/swift-log-syslog.git", from: "1.0.2")

LoggingSyslog

This Swift package implements a logging backend that logs to syslog.

It is an implementation of a LogHandler as defined by the Swift Server Working Group logging API.

Usage

Add https://github.com/ianpartridge/swift-log-syslog.git as a dependency in your Package.swift.

Then, during your application startup, do:

import Logging
import LoggingSyslog

// Initialize the syslog logger
LoggingSystem.bootstrap(SyslogLogHandler.init)

Elsewhere in your application, when you need to log, do:

// Create a logger (or re-use one you already have)
let logger = Logger(label: "MyApp")

// Log!
logger.info("Hello World!")

GitHub

link
Stars: 30
Last commit: 2 years 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

1.0.2
2 years ago
  • fix: remove unnecessary locking (#2)

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