bin/roowhod: configure loglevel via config file, use journald protocol
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user