Added the log level
This commit is contained in:
@@ -44,6 +44,10 @@ pub struct AppConfig {
|
||||
|
||||
#[serde(default)]
|
||||
pub musicbrainz: MusicBrainzConfig,
|
||||
|
||||
/// Log level: "error", "warn", "info", "debug", "trace". Default: "info".
|
||||
#[serde(default = "default_log_level")]
|
||||
pub log_level: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -219,6 +223,7 @@ impl Default for AppConfig {
|
||||
scheduling: SchedulingConfig::default(),
|
||||
subsonic: SubsonicConfig::default(),
|
||||
musicbrainz: MusicBrainzConfig::default(),
|
||||
log_level: default_log_level(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,6 +284,10 @@ impl Default for MetadataConfig {
|
||||
}
|
||||
}
|
||||
|
||||
fn default_log_level() -> String {
|
||||
"info".to_string()
|
||||
}
|
||||
|
||||
fn default_library_path() -> PathBuf {
|
||||
dirs::audio_dir().unwrap_or_else(|| PathBuf::from("~/Music"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user