Add a trace layer

This commit is contained in:
Greg Burri 2024-11-03 12:11:33 +01:00
parent 980c5884a4
commit 1f03c01d1d
5 changed files with 26 additions and 21 deletions

View file

@ -3,6 +3,7 @@ use lettre::{
transport::smtp::{authentication::Credentials, AsyncSmtpTransport},
AsyncTransport, Message, Tokio1Executor,
};
use tracing::{event, Level};
use crate::consts;
@ -57,7 +58,7 @@ pub async fn send_validation(
.build();
if let Err(error) = mailer.send(email).await {
eprintln!("Error when sending E-mail:\n{:?}", &error);
event!(Level::ERROR, "Error when sending E-mail: {}", &error);
}
Ok(())