bin/roowhod: configure loglevel via config file, use journald protocol

This commit is contained in:
2026-04-29 06:03:11 +09:00
parent 448ce6e500
commit a3aae2b28b
6 changed files with 47 additions and 15 deletions
+11
View File
@@ -8,6 +8,9 @@ pub const DEFAULT_CLIENT_SOCKET_PATH: &str = "/run/roowho2/server_client.sock";
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Config {
/// Logging level for the daemon.
pub log_level: Option<LogLevel>,
/// Configuration for the rwhod server.
pub rwhod: RwhodConfig,
@@ -17,6 +20,14 @@ pub struct Config {
pub client_socket_path: Option<String>,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum LogLevel {
Info,
Debug,
Trace,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RwhodConfig {
/// Enable or disable the rwhod server functionality.