1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use captains_log::*; #[cfg(feature = "syslog")] #[test] fn test_syslog() { let _ = recipe::syslog_local(syslog::Facility::LOG_USER, Level::Debug) .test() .build() .expect("setup"); info!("begin syslog test"); for _ in 0..10 { trace!("test syslog trace"); debug!("test syslog debug"); info!("test syslog info"); warn!("test syslog warn"); error!("test syslog error"); println!("sleep"); std::thread::sleep(std::time::Duration::from_secs(1)); } }