swift-log-syslog

1.0.2

📋 Syslog logging for Swift
ianpartridge/swift-log-syslog

What's New

1.0.2

2019-05-01T10:57:40Z
  • fix: remove unnecessary locking (#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!")

Description

  • Swift Tools 5.0.0
View More Packages from this Author

Dependencies

Last updated: Mon Oct 21 2024 11:46:15 GMT-0900 (Hawaii-Aleutian Daylight Time)