use cirious_codex_logger::{AsyncDispatcher, Dispatcher, HumanReadableFormatter, Level, Record, StdoutDispatcher};
use std::time::SystemTime;
#[test]
fn test_async_dispatcher_execution() {
let stdout = Box::new(StdoutDispatcher::new(HumanReadableFormatter));
let async_dispatcher = AsyncDispatcher::new(stdout, 5);
let record = Record {
level: Level::Debug,
args: "Async test message".to_string(),
file: "test.rs",
line: 1,
module_path: "test",
timestamp: SystemTime::now(),
};
async_dispatcher.dispatch(&record).ok();
std::thread::sleep(std::time::Duration::from_millis(100));
}