From 8efc061e1d303c6beb058f15dce34a222fa8d570 Mon Sep 17 00:00:00 2001 From: nikstur Date: Sun, 23 Apr 2023 22:52:13 +0200 Subject: [PATCH] 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