🔉 update: demote some boring logs from debug to trace

main
_ 2020-12-16 19:06:15 -06:00
parent 3bc8323cc8
commit 626946b7b7
2 changed files with 15 additions and 10 deletions

View File

@ -141,7 +141,7 @@ async fn handle_http_request (
// disconnects right as we're sending this.
// Then what?
debug! (
trace! (
"Sending request {} directly to server {}",
req_id,
watcher_code,
@ -395,12 +395,17 @@ async fn reload_config (
config_reload_path: &Path
) -> Result <(), ConfigError> {
let new_config = Config::from_file (config_reload_path).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 ());
}
if config.iso.enable_scraper_api != new_config.iso.enable_scraper_api {
debug! ("enable_scraper_api: {}", config.iso.enable_scraper_api);
}
(*config) = new_config;
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!");

View File

@ -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));
}
@ -109,14 +109,14 @@ pub async fn handle_listen (
futures::select! {
x = rx.fuse () => match x {
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 (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")?),
},
_ = 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")?)
}
}
@ -178,7 +178,7 @@ pub async fn handle_response (
}
}
else {
debug! ("Finished relaying bytes");
trace! ("Finished relaying bytes");
body_finished_tx.send (StreamFinished).map_err (|_| LostServer)?;
break;
}
@ -213,7 +213,7 @@ pub async fn handle_response (
relay_task.await??;
debug! ("Connected server to client for streaming.");
trace! ("Connected server to client for streaming.");
match body_finished_rx.await {
Ok (StreamFinished) => {
Ok (error_reply (StatusCode::OK, "StreamFinished")?)