Add a trace layer
This commit is contained in:
parent
980c5884a4
commit
1f03c01d1d
5 changed files with 26 additions and 21 deletions
|
|
@ -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(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue