From 400e9de32332bdb2c7a42a8d3e42f7397cc72511 Mon Sep 17 00:00:00 2001 From: Felix Leupold Date: Fri, 20 Oct 2023 09:50:47 +0200 Subject: [PATCH] More minor logging improvements (#1995) # Changes - Only log solutions in info if they are non empty - Log the full auction in auction kickoff log --------- Co-authored-by: Martin Beckmann --- crates/autopilot/src/run_loop.rs | 2 +- crates/driver/src/infra/observe/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/autopilot/src/run_loop.rs b/crates/autopilot/src/run_loop.rs index e6e1b3deb0..b3e4be06a5 100644 --- a/crates/autopilot/src/run_loop.rs +++ b/crates/autopilot/src/run_loop.rs @@ -111,7 +111,7 @@ impl RunLoop { } async fn single_run(&self, auction_id: AuctionId, auction: &Auction) { - tracing::info!("solving"); + tracing::info!(?auction, "solving"); let solutions = { let mut solutions = self.competition(auction_id, auction).await; diff --git a/crates/driver/src/infra/observe/mod.rs b/crates/driver/src/infra/observe/mod.rs index 94e440614f..a24f8c8887 100644 --- a/crates/driver/src/infra/observe/mod.rs +++ b/crates/driver/src/infra/observe/mod.rs @@ -61,7 +61,7 @@ pub fn fetching_liquidity_failed(err: &boundary::Error) { /// Observe the solutions returned by the solver. pub fn solutions(solutions: &[Solution]) { - if !solutions.is_empty() { + if solutions.iter().any(|s| !s.is_empty()) { tracing::info!(?solutions, "computed solutions"); } else { tracing::debug!("no solutions");