log outcome of loading user db

This commit is contained in:
Kai Jan Kriegel 2022-03-19 05:54:18 +01:00
parent 9bd1b917a2
commit 41f8b83cd5

View File

@ -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");