Use tracing for logging
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
use anyhow::{anyhow, Context};
|
use anyhow::{anyhow, Context};
|
||||||
use lldap_auth::{opaque, registration};
|
use lldap_auth::{opaque, registration};
|
||||||
use surf::Client;
|
use surf::Client;
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
pub async fn change_password(client: &Client, user_id: &str, password: &str) -> anyhow::Result<()> {
|
pub async fn change_password(client: &Client, user_id: &str, password: &str) -> anyhow::Result<()> {
|
||||||
let mut rng = rand::rngs::OsRng;
|
let mut rng = rand::rngs::OsRng;
|
||||||
@@ -42,7 +43,7 @@ pub async fn change_password(client: &Client, user_id: &str, password: &str) ->
|
|||||||
.await
|
.await
|
||||||
.map_err(|e| anyhow!(e))?;
|
.map_err(|e| anyhow!(e))?;
|
||||||
|
|
||||||
println!("Changed '{user_id}' password successfully");
|
debug!("Changed '{user_id}' password successfully");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user