more logs to file watcher

This commit is contained in:
Nikita Galaiko 2023-06-01 09:11:56 +02:00
parent 16be4b26f7
commit 705e0b4ffb
2 changed files with 17 additions and 3 deletions

View File

@ -70,7 +70,20 @@ impl Dispatcher {
file_path.display()
)
})
.map(|relative_file_path| rtx.send(relative_file_path.to_path_buf()))
.map(|relative_file_path| {
log::info!(
"{}: file changed: {}",
self.project_id,
relative_file_path.display()
);
if let Err(e) = rtx.send(relative_file_path.to_path_buf()) {
log::error!(
"{}: failed to send file change event: {:#}",
self.project_id,
e
);
}
})
{
log::error!(
"{}: failed to send file change event: {:#}",

View File

@ -34,8 +34,9 @@ impl Dispatcher {
if self.cancellation_token.is_cancelled() {
break;
}
println!("{}: tick", self.project_id);
rtx.send(time::SystemTime::now())?;
if let Err(e) = rtx.send(time::SystemTime::now()) {
log::error!("{}: failed to send tick: {}", self.project_id, e);
}
}
log::info!("{}: ticker stopped", self.project_id);