#syslog

syslog-c

A simple package same as syslog in C

4 releases

0.1.3 Jul 19, 2023
0.1.2 Jul 19, 2023
0.1.1 Jul 19, 2023
0.1.0 Jul 19, 2023

#21 in #syslog

MIT/Apache

3KB

Just a simple package of C library syslog, which is convenient for us to use in the process of rewriting C code to Rust.

Example

let ident = String::from("myprogram");
syslog_c::openlog(&ident, libc::LOG_CONS | libc::LOG_PID, libc::LOG_AUTHPRIV);
let file_name = String::from("null.txt");
let msg = format!("{} {}", "No this file", file_name);
syslog_c::syslog(libc::LOG_ERR, &msg);

lib.rs:

’syslog-c‘ is just a simple package of C library syslog, which is convenient for us to use in the process of rewriting C code to Rust

Dependencies

~44KB