From d45227e67bb8d3e572eb912d4da2b804714d0f2a Mon Sep 17 00:00:00 2001 From: Emmanuel Bosquet Date: Wed, 7 Aug 2024 11:42:44 +0200 Subject: [PATCH 1/2] change log level of "unknown task" from error to warn --- bin/src/command/server.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/src/command/server.rs b/bin/src/command/server.rs index a20f70c34..7bb7ad4b9 100644 --- a/bin/src/command/server.rs +++ b/bin/src/command/server.rs @@ -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; } }; From daa5c02424d37e867d16c76913f274352538cba1 Mon Sep 17 00:00:00 2001 From: Emmanuel Bosquet Date: Wed, 7 Aug 2024 12:01:35 +0200 Subject: [PATCH 2/2] change multiline info and debug statements to inline --- bin/src/command/server.rs | 6 +++--- command/src/config.rs | 4 ++-- command/src/state.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/src/command/server.rs b/bin/src/command/server.rs index 7bb7ad4b9..67a898fe5 100644 --- a/bin/src/command/server.rs +++ b/bin/src/command/server.rs @@ -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); } @@ -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; @@ -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); } diff --git a/command/src/config.rs b/command/src/config.rs index a121f99ee..85f649c5a 100644 --- a/command/src/config.rs +++ b/command/src/config.rs @@ -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, )); diff --git a/command/src/state.rs b/command/src/state.rs index bb40f4494..5e339f4b8 100644 --- a/command/src/state.rs +++ b/command/src/state.rs @@ -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 { let configuration = self.clusters.get(cluster_id).cloned()?; - info!("{:#?}", configuration); + info!("{:?}", configuration); let http_frontends: Vec = self .http_fronts