aboutsummaryrefslogtreecommitdiff
path: root/src/mail.rs
diff options
context:
space:
mode:
authorJoris2024-06-02 12:53:20 +0200
committerJoris2024-06-02 12:53:20 +0200
commit0d5ec3626773edb7d32884c594230c7cc03ae0e7 (patch)
tree768b6d6fee0b5409c7a12f5aa7b191a25ca5f2d7 /src/mail.rs
parent76a761630a8e6f5686d7e4384948ed949f702f3b (diff)
Simplify logging initmain
Diffstat (limited to 'src/mail.rs')
-rw-r--r--src/mail.rs10
1 files changed, 5 insertions, 5 deletions
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
}
}