From 68d1928e3dc84d04ee8bf55392fbc0d1eab42d51 Mon Sep 17 00:00:00 2001 From: nikstur Date: Sun, 23 Apr 2023 23:27:32 +0200 Subject: [PATCH 1/2] Revert "tool: don't silently ignore generations" This reverts commit 4f182704e0bf35d4553ac2812f91868de2a3fd2e. --- rust/tool/src/install.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/tool/src/install.rs b/rust/tool/src/install.rs index b41841b..e74d130 100644 --- a/rust/tool/src/install.rs +++ b/rust/tool/src/install.rs @@ -172,7 +172,7 @@ impl Installer { // Ignore failing to read a generation so that old malformed generations do not stop // lzbt from working. if let Err(e) = &generation_result { - log::warn!( + log::debug!( "Ignoring generation {} because it's malformed: {e:#}", link.version ); From 8efc061e1d303c6beb058f15dce34a222fa8d570 Mon Sep 17 00:00:00 2001 From: nikstur Date: Sun, 23 Apr 2023 22:52:13 +0200 Subject: [PATCH 2/2] tool: add comment for log level of malformed gens The message about malformed generatiosn should semantically be a warning. However, since users might have hundres of old and thus malformed generations and can do little about it, this should remain a debug message. This way the user is not spammed with no-op warnings while still enabling debugging. --- rust/tool/src/install.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rust/tool/src/install.rs b/rust/tool/src/install.rs index e74d130..078a82c 100644 --- a/rust/tool/src/install.rs +++ b/rust/tool/src/install.rs @@ -172,6 +172,10 @@ impl Installer { // Ignore failing to read a generation so that old malformed generations do not stop // lzbt from working. if let Err(e) = &generation_result { + // Semantically, this message should be a warning. However, since users might + // have hundreds of old and thus malformed generations and can do little about + // it, this should remain a debug message. This way the user is not spammed + // with no-op warnings while still enabling debugging. log::debug!( "Ignoring generation {} because it's malformed: {e:#}", link.version