Skip to content

Commit

Permalink
chore: update log messages
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Liu <sam@secondstate.io>
  • Loading branch information
apepkuss committed Oct 22, 2024
1 parent 95a5d2a commit aea31be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1730,7 +1730,7 @@ pub(crate) async fn remove_url_handler(
Path(url_type): Path<String>,
body: String,
) -> Result<StatusCode, StatusCode> {
println!("In remove_url_handler");
info!(target: "stdout", "In remove_url_handler");

let url_type = match url_type.as_str() {
"image" => UrlType::Image,
Expand All @@ -1740,7 +1740,7 @@ pub(crate) async fn remove_url_handler(
let url: Uri = body.parse().map_err(|_| StatusCode::BAD_REQUEST)?;
state.remove_url(url_type, &url);

println!("unregistered {}", url);
info!(target: "stdout", "unregistered {}", url);

Ok(StatusCode::OK)
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl AppState {
.retain(|server| &server.url != url);

// Optionally, log the removal
println!("Removed {} URL: {}", url_type, url);
info!(target: "stdout", "Removed {} URL: {}", url_type, url);
}
}

Expand Down

0 comments on commit aea31be

Please sign in to comment.