Add serde defaults for logging

This commit is contained in:
lukas0008 committed 2024-10-11 17:12:35 +02:00
1 parent 68ab173ee8
commit 7db8c0ed97
4 files changed
+15 -7

No files matched your search

+5
View File
@@ -23,15 +23,20 @@ pub struct RCONConfig {
pub logging: RCONLogging,
}
#[serde_inline_default]
#[derive(Deserialize, Serialize, Clone, Debug)]
pub struct RCONLogging {
/// Whether successful RCON logins should be logged.
#[serde_inline_default(true)]
pub log_logged_successfully: bool,
/// Whether failed RCON login attempts with incorrect passwords should be logged.
#[serde_inline_default(true)]
pub log_wrong_password: bool,
/// Whether all RCON commands, regardless of success or failure, should be logged.
#[serde_inline_default(true)]
pub log_commands: bool,
/// Whether RCON quit commands should be logged.
#[serde_inline_default(true)]
pub log_quit: bool,
}