diff --git a/src/task.rs b/src/task.rs index 8f54d87..800b351 100644 --- a/src/task.rs +++ b/src/task.rs @@ -1,6 +1,6 @@ use std::fmt; -pub trait Task { +pub trait Task: std::fmt::Debug { fn tick(&mut self) {} fn start(&mut self) {} fn stop(&mut self) {} @@ -123,6 +123,7 @@ impl ScheduledTask { } } +#[derive(Debug)] pub struct Scheduler { tasks: Vec, } @@ -131,7 +132,7 @@ impl Scheduler { pub fn new(tasks: Vec>) -> Self { let mut scheduled = Vec::new(); for task in tasks { - log::info!("Scheduling task {:?}", task.name()); + log::info!("Scheduling task {} {:?}", task.name(), task); scheduled.push(ScheduledTask::new(task)); } Scheduler {