4 stable releases

new 7.1.1 May 21, 2024
7.1.0 Nov 20, 2023
7.0.1 Oct 18, 2023

#229 in Unix APIs

Download history 7/week @ 2024-02-21 27/week @ 2024-02-28 1/week @ 2024-03-06 5/week @ 2024-03-13 11/week @ 2024-03-27 30/week @ 2024-04-03 3/week @ 2024-04-10 90/week @ 2024-05-15

90 downloads per month

MIT license

33KB
777 lines

Sending to Syslog in Rust

A small library to write to local syslog.

This crate is forked from syslog, and adds support for TLS among with some other quality-of-life changes.

Installation

syslog-tls is available on crates.io and can be included in your Cargo enabled project like this:

[dependencies]
syslog = "^7.0"

documentation

Reference documentation is available here.

There are 4 functions to create loggers:

  • the unix function sends to the local syslog through a Unix socket: syslog::unix(formatter)
  • the udp function takes an address for a local port, and the address remote UDP syslog server: udp(formatter, "127.0.0.1:1234", "127.0.0.1:4242")
  • the tcp function takes an address for a remote TCP syslog server: tcp(formatter, "127.0.0.1:4242")
  • the tls function takes an address for a remote TCP syslog server, a certificate, and a host domain: tls(formatter, "127.0.0.1:4242", certificate, host)

Dependencies

~3–14MB
~181K SLoC