syslog-c

Crates.iosyslog-c
lib.rssyslog-c
version0.1.3
sourcesrc
created_at2023-07-19 06:50:02.594954
updated_at2023-07-19 07:45:18.769901
descriptionA simple package same as syslog in C
homepage
repository
max_upload_size
id920068
size2,900
Bi Tiekai (vc-zju)

documentation

https://docs.rs/syslog-c/0.1.3

README

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);
Commit count: 0

cargo fmt