Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct debug statements #1125

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions bin/src/command/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ impl CommandHub {
let id = self.next_client_id();
let session = ClientSession::new(channel, id, token);
info!("Register new client: {}", id);
debug!("{:#?}", session);
debug!("registering client {:?}", session);
self.clients.insert(token, session);
}

Expand Down Expand Up @@ -295,7 +295,7 @@ impl CommandHub {
/// - manage timeouts of tasks
pub fn run(&mut self) {
let mut events = Events::with_capacity(100);
debug!("running the command hub: {:#?}", self);
debug!("running the command hub: {:?}", self);

loop {
let run_state = self.run_state;
Expand Down Expand Up @@ -401,7 +401,7 @@ impl CommandHub {
}
ClientResult::CloseSession => {
info!("Closing client {}", client.id);
debug!("{:#?}", client);
debug!("closing client {:?}", client);
self.event_subscribers.remove(&token);
self.clients.remove(&token);
}
Expand Down Expand Up @@ -447,14 +447,15 @@ impl CommandHub {
}

let Some(task_id) = self.in_flight.get(&response.id).copied() else {
error!("Got a response for an unknown task: {}", response);
// this will appear on startup, when requesting status. It is inconsequential.
warn!("Got a response for an unknown task: {}", response);
return;
};

let task = match self.tasks.get_mut(&task_id) {
Some(task) => task,
None => {
error!("Got a response for an unknown task");
warn!("Got a response for an unknown task");
return;
}
};
Expand Down
4 changes: 2 additions & 2 deletions command/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1375,8 +1375,8 @@ impl ConfigBuilder {
frontend.key.clone_from(&https_listener.key);
}
if frontend.certificate.is_none() {
debug!("known addresses: {:#?}", self.known_addresses);
debug!("frontend: {:#?}", frontend);
debug!("known addresses: {:?}", self.known_addresses);
debug!("frontend: {:?}", frontend);
return Err(ConfigError::WrongFrontendProtocol(
ListenerProtocol::Https,
));
Expand Down
2 changes: 1 addition & 1 deletion command/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ impl ConfigState {
/// Types like `HttpFrontend` are converted into protobuf ones, like `RequestHttpFrontend`
pub fn cluster_state(&self, cluster_id: &str) -> Option<ClusterInformation> {
let configuration = self.clusters.get(cluster_id).cloned()?;
info!("{:#?}", configuration);
info!("{:?}", configuration);

let http_frontends: Vec<RequestHttpFrontend> = self
.http_fronts
Expand Down
Loading