Add some logging so that with the env variable RUST_LOG=debug or similar, there is timestamped output to stderr
This commit is contained in:
@@ -8,6 +8,7 @@ use argon2::{
|
||||
use std::fs::File;
|
||||
use std::io::{BufRead, BufReader};
|
||||
use std::path::PathBuf;
|
||||
use log::info;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct PasswordDirectory {
|
||||
@@ -49,6 +50,7 @@ impl PasswordDirectory {
|
||||
///
|
||||
fn check_hashed_password(&self, lines: &Vec<String>, password: &str) -> bool {
|
||||
let (key, split_password) = password.strip_prefix('[').unwrap().split_once(']').unwrap();
|
||||
info!(" looking for password-key: [{}]", key);
|
||||
|
||||
let mut result = false;
|
||||
|
||||
@@ -72,6 +74,8 @@ impl PasswordDirectory {
|
||||
}
|
||||
|
||||
fn check_plain_password(&self, lines: &Vec<String>, password: &str) -> bool {
|
||||
info!(" looking for plain password");
|
||||
|
||||
let mut result = false;
|
||||
|
||||
for line in lines {
|
||||
|
||||
Reference in New Issue
Block a user