Closed axos88 closed 5 years ago
I wound up using this:
let formatter = syslog::Formatter3164 {
facility: syslog::Facility::LOG_DAEMON,
hostname: None,
process: "xxxx".into(),
pid: std::process::id() as i32,
};
let inner = syslog::unix(formatter).expect("could not connect to syslog");
let inner = syslog_logger::SyslogLogger::new(inner);
// Actually I'm wrapping this in my own implementation that adds a few extra bells and whistles, but this should also work:
log::set_boxed_logger(Box::new(inner))
thanks, I just added an example with the log crate in 54727a7
Seconded. Maybe it's obvious to some, but I get it.