Repository: lldap/lldap (language: rust)

Issue:
[FEATURE REQUEST] Downgrade key_seed warning, provide a way to silence it



Discussion / hints:

Fix patch:
diff --git a/server/src/infra/configuration.rs b/server/src/infra/configuration.rs
index 4a8c0428..522a6c65 100644
--- a/server/src/infra/configuration.rs
+++ b/server/src/infra/configuration.rs
@@ -361,9 +361,9 @@ fn get_server_setup<L: Into<PrivateKeyLocationOrFigment>>(
                 file_path
             );
         } else if file_path == "server_key" {
-            eprintln!("WARNING: A key_seed was given, we will ignore the server_key and generate one from the seed!");
+            eprintln!("WARNING: A key_seed was given, we will ignore the server_key and generate one from the seed! Set server_key to an empty string in the config to silence this message.");
         } else {
-            println!("Generating the key from the key_seed");
+            println!("Generating the private key from the key_seed");
         }
         use rand::SeedableRng;
         let mut rng = rand_chacha::ChaCha20Rng::from_seed(stable_hash(key_seed.as_bytes()));
@@ -583,10 +583,10 @@ where
         let expected_keys = expected_keys(&figment_config.data()?[&Profile::Default]);
         env_variable_provider().data().unwrap()[&Profile::default()]
             .keys()
-            .map(|k| k.to_ascii_uppercase())
+            .map(|k| format!("LLDAP_{}", k.to_ascii_uppercase()))
             .filter(|k| !expected_keys.contains(k.as_str()))
             .for_each(|k| {
-                eprintln!("WARNING: Unknown environment variable: LLDAP_{}", k);
+                eprintln!("WARNING: Unknown environment variable: {}", k);
             });
     }
     config.server_setup = Some(get_server_setup(


Test patch: