Added log pattern to main.cfg

This commit is contained in:
Ara Sadoyan
2026-09-16 19:18:18 +02:00
parent 444579eefe
commit 02a329e66b
3 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -44,7 +44,11 @@ pub fn log_builder(conf: &AppConfig, location: &Option<String>) {
}
};
let pattern = "{d(%Y-%m-%d %H:%M:%S)} {l} {t} - {m}\n";
let mut pat: String = "{d(%Y-%m-%d %H:%M:%S)} {l} - {m} {n}".to_string();
if let Some(ptrn) = conf.log_pattern.clone() {
pat = ptrn;
}
let pattern = pat.as_str();
if let Some(location) = location {
let parts: Vec<&str> = location.splitn(4, ',').map(|s| s.trim()).collect();