Replace println!()s with logging macros

This commit is contained in:
Kitaiti Makoto
2021-01-06 21:40:14 +09:00
parent ee96d2b754
commit becb40544c
7 changed files with 21 additions and 14 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
use tracing::warn;
use plume_common::activity_pub::{
inbox::FromId,
request::Digest,
@@ -41,7 +42,7 @@ pub fn handle_incoming(
}
})
.map_err(|_| {
println!(
warn!(
"Rejected invalid activity supposedly from {}, with headers {:?}",
actor.username, headers.0
);
@@ -58,7 +59,7 @@ pub fn handle_incoming(
Ok(match inbox(&rockets, act) {
Ok(_) => String::new(),
Err(e) => {
println!("Shared inbox error: {:?}", e);
warn!("Shared inbox error: {:?}", e);
format!("Error: {:?}", e)
}
})