| Crates.io | syslog-c |
| lib.rs | syslog-c |
| version | 0.1.3 |
| created_at | 2023-07-19 06:50:02.594954+00 |
| updated_at | 2023-07-19 07:45:18.769901+00 |
| description | A simple package same as syslog in C |
| homepage | |
| repository | |
| max_upload_size | |
| id | 920068 |
| size | 2,900 |
Just a simple package of C library syslog, which is convenient for us to use in the process of rewriting C code to Rust.
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);