From 0d5ec3626773edb7d32884c594230c7cc03ae0e7 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 2 Jun 2024 12:53:20 +0200 Subject: Simplify logging init --- src/mail.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mail.rs') diff --git a/src/mail.rs b/src/mail.rs index 9fe0ed8..c77e2ad 100644 --- a/src/mail.rs +++ b/src/mail.rs @@ -23,7 +23,7 @@ pub async fn send( ) -> bool { let headers = format_headers(recipients.clone(), subject); - info!( + log::info!( "Sending mail{}\n{}", if config.mock_mails { " (MOCK)" } else { "" }, headers.clone() @@ -52,18 +52,18 @@ pub async fn send( match spawn(command, &message.into_bytes()).await { Ok(output) => { if output.status.success() { - info!("Mail sent"); + log::info!("Mail sent"); true } else { match String::from_utf8(output.stderr) { - Ok(error) => error!("Error sending email: {}", error), - _ => error!("Error sending email"), + Ok(error) => log::error!("Error sending email: {}", error), + _ => log::error!("Error sending email"), }; false } } Err(err) => { - error!("Error spawning command: {:?}", err); + log::error!("Error spawning command: {:?}", err); false } } -- cgit v1.2.3