Swiftpack.co - Package - ianpartridge/swift-log-syslog

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: 9
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

1.0.2 - May 1, 2019

  • fix: remove unnecessary locking (#2)

1.0.1 - May 1, 2019

  • Don't call openlog()

1.0.0 - Apr 30, 2019

  • Initial release.