Add library version to debug log

This commit is contained in:
Félix Saparelli 2022-03-15 23:25:54 +13:00
parent 223d29fa4a
commit 17edfe663b
2 changed files with 4 additions and 3 deletions

View File

@ -47,8 +47,9 @@ impl Watcher {
) -> Result<Box<dyn notify::Watcher + Send>, RuntimeError> {
match self {
Self::Native => notify::RecommendedWatcher::new(f).map(|w| Box::new(w) as _),
Self::Poll(delay) => notify::PollWatcher::with_delay(f, delay)
.map(|w| Box::new(w) as _),
Self::Poll(delay) => {
notify::PollWatcher::with_delay(f, delay).map(|w| Box::new(w) as _)
}
}
.map_err(|err| RuntimeError::FsWatcher {
kind: self,

View File

@ -58,7 +58,7 @@ impl Watchexec {
mut init: InitConfig,
mut runtime: RuntimeConfig,
) -> Result<Arc<Self>, CriticalError> {
debug!(?init, ?runtime, pid=%std::process::id(), "initialising");
debug!(?init, ?runtime, pid=%std::process::id(), version=%env!("CARGO_PKG_VERSION"), "initialising");
let (ev_s, ev_r) = mpsc::channel(init.event_channel_size);
let (ac_s, ac_r) = watch::channel(take(&mut runtime.action));