summaryrefslogtreecommitdiffstats
path: root/server/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/lib.rs')
-rw-r--r--server/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/lib.rs b/server/src/lib.rs
index f437c200..eeaadb63 100644
--- a/server/src/lib.rs
+++ b/server/src/lib.rs
@@ -39,6 +39,7 @@ use lettre::smtp::extension::ClientId;
use lettre::smtp::ConnectionReuseParameters;
use lettre::{ClientSecurity, SmtpClient, Transport};
use lettre_email::Email;
+use log::error;
use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
@@ -190,7 +191,7 @@ fn fetch_iframely_and_pictshare_data(
Some(url) => match fetch_iframely(&url) {
Ok(res) => (res.title, res.description, res.thumbnail_url, res.html),
Err(e) => {
- eprintln!("iframely err: {}", e);
+ error!("iframely err: {}", e);
(None, None, None, None)
}
},
@@ -202,7 +203,7 @@ fn fetch_iframely_and_pictshare_data(
Some(iframely_thumbnail_url) => match fetch_pictshare(&iframely_thumbnail_url) {
Ok(res) => Some(res.url),
Err(e) => {
- eprintln!("pictshare err: {}", e);
+ error!("pictshare err: {}", e);
None
}
},