From 41f8b83cd590eeb08777fd43bf2998b513ab355f Mon Sep 17 00:00:00 2001 From: Kai Jan Kriegel Date: Sat, 19 Mar 2022 05:54:18 +0100 Subject: [PATCH] log outcome of loading user db --- bin/bffhd/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/bffhd/main.rs b/bin/bffhd/main.rs index f07f9f8..9da1ab0 100644 --- a/bin/bffhd/main.rs +++ b/bin/bffhd/main.rs @@ -8,6 +8,7 @@ use std::{env, io, io::Write, path::PathBuf}; use nix::NixPath; +use diflouroborane::error::Error; fn main() -> anyhow::Result<()> { @@ -114,7 +115,11 @@ fn main() -> anyhow::Result<()> { unimplemented!() } else if matches.is_present("load") { let bffh = Diflouroborane::new(config)?; - bffh.users.load_file(matches.value_of("load").unwrap()); + if bffh.users.load_file(matches.value_of("load").unwrap()).is_ok() { + tracing::info!("loaded users from {}", matches.value_of("load").unwrap()); + } else { + tracing::error!("failed to load users from {}", matches.value_of("load").unwrap()); + } return Ok(()) } else { let keylog = matches.value_of("keylog");