Skip to content

Commit

Permalink
feat: improve logging for HTTP tracker bootstrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Jan 9, 2024
1 parent 9f3f949 commit ba4cb34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/servers/http/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use axum_server::tls_rustls::RustlsConfig;
use axum_server::Handle;
use derive_more::Constructor;
use futures::future::BoxFuture;
use log::info;
use tokio::sync::oneshot::{Receiver, Sender};

use super::v1::routes::router;
Expand Down Expand Up @@ -51,6 +52,9 @@ impl Launcher {
));

let tls = self.tls.clone();
let protocol = if tls.is_some() { "https" } else { "http" };

info!(target: "HTTP Tracker", "Starting on: {protocol}://{}", address);

let running = Box::pin(async {
match tls {
Expand All @@ -67,6 +71,8 @@ impl Launcher {
}
});

info!(target: "HTTP Tracker", "Started on: {protocol}://{}", address);

tx_start
.send(Started { address })
.expect("the HTTP(s) Tracker service should not be dropped");
Expand Down

0 comments on commit ba4cb34

Please sign in to comment.