#syslog #logging #process #libc #ident #pid #cons

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

#8 in #cons

Download history 3/week @ 2024-09-19 5/week @ 2024-09-26 1/week @ 2024-10-03 6/week @ 2024-11-28 33/week @ 2024-12-05 23/week @ 2024-12-12

62 downloads per month

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

~43KB