🔉 update: demote some boring logs from debug to trace
parent
3bc8323cc8
commit
626946b7b7
|
@ -141,7 +141,7 @@ async fn handle_http_request (
|
||||||
// disconnects right as we're sending this.
|
// disconnects right as we're sending this.
|
||||||
// Then what?
|
// Then what?
|
||||||
|
|
||||||
debug! (
|
trace! (
|
||||||
"Sending request {} directly to server {}",
|
"Sending request {} directly to server {}",
|
||||||
req_id,
|
req_id,
|
||||||
watcher_code,
|
watcher_code,
|
||||||
|
@ -395,12 +395,17 @@ async fn reload_config (
|
||||||
config_reload_path: &Path
|
config_reload_path: &Path
|
||||||
) -> Result <(), ConfigError> {
|
) -> Result <(), ConfigError> {
|
||||||
let new_config = Config::from_file (config_reload_path).await?;
|
let new_config = Config::from_file (config_reload_path).await?;
|
||||||
|
|
||||||
let mut config = state.config.write ().await;
|
let mut config = state.config.write ().await;
|
||||||
(*config) = new_config;
|
|
||||||
|
|
||||||
|
trace! ("Reloading config");
|
||||||
|
if config.servers.len () != new_config.servers.len () {
|
||||||
debug! ("Loaded {} server configs", config.servers.len ());
|
debug! ("Loaded {} server configs", config.servers.len ());
|
||||||
|
}
|
||||||
|
if config.iso.enable_scraper_api != new_config.iso.enable_scraper_api {
|
||||||
debug! ("enable_scraper_api: {}", config.iso.enable_scraper_api);
|
debug! ("enable_scraper_api: {}", config.iso.enable_scraper_api);
|
||||||
|
}
|
||||||
|
|
||||||
|
(*config) = new_config;
|
||||||
|
|
||||||
if config.iso.dev_mode.is_some () {
|
if config.iso.dev_mode.is_some () {
|
||||||
error! ("Dev mode is enabled! This might turn off some security features. If you see this in production, escalate it to someone!");
|
error! ("Dev mode is enabled! This might turn off some security features. If you see this in production, escalate it to someone!");
|
||||||
|
|
|
@ -100,7 +100,7 @@ pub async fn handle_listen (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
debug! ("Parking server {}", watcher_code);
|
trace! ("Parking server {}", watcher_code);
|
||||||
request_rendezvous.insert (watcher_code.clone (), ParkedServer (tx));
|
request_rendezvous.insert (watcher_code.clone (), ParkedServer (tx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,14 +109,14 @@ pub async fn handle_listen (
|
||||||
futures::select! {
|
futures::select! {
|
||||||
x = rx.fuse () => match x {
|
x = rx.fuse () => match x {
|
||||||
Ok (Ok (one_req)) => {
|
Ok (Ok (one_req)) => {
|
||||||
debug! ("Unparking server {}", watcher_code);
|
trace! ("Unparking server {}", watcher_code);
|
||||||
Ok (ok_reply (rmp_serde::to_vec (&vec! [one_req])?)?)
|
Ok (ok_reply (rmp_serde::to_vec (&vec! [one_req])?)?)
|
||||||
},
|
},
|
||||||
Ok (Err (ShuttingDownError::ShuttingDown)) => Ok (error_reply (StatusCode::SERVICE_UNAVAILABLE, "Server is shutting down, try again soon")?),
|
Ok (Err (ShuttingDownError::ShuttingDown)) => Ok (error_reply (StatusCode::SERVICE_UNAVAILABLE, "Server is shutting down, try again soon")?),
|
||||||
Err (_) => Ok (error_reply (StatusCode::INTERNAL_SERVER_ERROR, "Server error")?),
|
Err (_) => Ok (error_reply (StatusCode::INTERNAL_SERVER_ERROR, "Server error")?),
|
||||||
},
|
},
|
||||||
_ = delay_for (Duration::from_secs (30)).fuse () => {
|
_ = delay_for (Duration::from_secs (30)).fuse () => {
|
||||||
debug! ("Timed out http_listen for server {}", watcher_code);
|
trace! ("Timed out http_listen for server {}", watcher_code);
|
||||||
return Ok (error_reply (StatusCode::NO_CONTENT, "No requests now, long-poll again")?)
|
return Ok (error_reply (StatusCode::NO_CONTENT, "No requests now, long-poll again")?)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ pub async fn handle_response (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
debug! ("Finished relaying bytes");
|
trace! ("Finished relaying bytes");
|
||||||
body_finished_tx.send (StreamFinished).map_err (|_| LostServer)?;
|
body_finished_tx.send (StreamFinished).map_err (|_| LostServer)?;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ pub async fn handle_response (
|
||||||
|
|
||||||
relay_task.await??;
|
relay_task.await??;
|
||||||
|
|
||||||
debug! ("Connected server to client for streaming.");
|
trace! ("Connected server to client for streaming.");
|
||||||
match body_finished_rx.await {
|
match body_finished_rx.await {
|
||||||
Ok (StreamFinished) => {
|
Ok (StreamFinished) => {
|
||||||
Ok (error_reply (StatusCode::OK, "StreamFinished")?)
|
Ok (error_reply (StatusCode::OK, "StreamFinished")?)
|
||||||
|
|
Loading…
Reference in New Issue