diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-23 00:48:22 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-23 00:48:22 +0300 |
| commit | 40750418049c5125724b004c8f55ae66ca77edcf (patch) | |
| tree | d72ecadb0506c3643ffaa5fe7cf40f22c90d967a /src/app/config_io.rs | |
| parent | 3d6f3e78624f1308a360cbf02eeca3fec2434436 (diff) | |
feat(logging): add robust rotating support logs
Diffstat (limited to 'src/app/config_io.rs')
| -rw-r--r-- | src/app/config_io.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/app/config_io.rs b/src/app/config_io.rs index 5d4b2b13..6770d61e 100644 --- a/src/app/config_io.rs +++ b/src/app/config_io.rs @@ -8,6 +8,7 @@ impl App { let path = crate::config::config_path(); if let Some(parent) = path.parent() { if let Err(err) = std::fs::create_dir_all(parent) { + crate::logging::config_write_failed(&path, error_context, &err.to_string()); self.state.config_diagnostic = Some(format!("failed to save {error_context}: {err}")); self.config_diagnostic_deadline = @@ -19,6 +20,7 @@ impl App { let content = std::fs::read_to_string(&path).unwrap_or_default(); let new_content = update(&content); if let Err(err) = std::fs::write(&path, new_content) { + crate::logging::config_write_failed(&path, error_context, &err.to_string()); self.state.config_diagnostic = Some(format!("failed to save {error_context}: {err}")); self.config_diagnostic_deadline = Some(std::time::Instant::now() + std::time::Duration::from_secs(5)); |
