| Crates.io | syslog-tls |
| lib.rs | syslog-tls |
| version | 7.1.1 |
| created_at | 2023-10-18 12:31:45.281881+00 |
| updated_at | 2024-05-21 11:51:22.921355+00 |
| description | Send log messages to syslog |
| homepage | |
| repository | https://github.com/JonathanBrouwer/rust-syslog |
| max_upload_size | |
| id | 1006709 |
| size | 50,942 |
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.
syslog-tls is available on crates.io and can be included in your Cargo enabled project like this:
[dependencies]
syslog = "^7.0"
Reference documentation is available here.
There are 4 functions to create loggers:
unix function sends to the local syslog through a Unix socket: syslog::unix(formatter)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")tcp function takes an address for a remote TCP syslog server: tcp(formatter, "127.0.0.1:4242")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)