From 40750418049c5125724b004c8f55ae66ca77edcf Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Thu, 23 Apr 2026 00:48:22 +0300 Subject: feat(logging): add robust rotating support logs --- src/update.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/update.rs') diff --git a/src/update.rs b/src/update.rs index 1183a7eb..6a0b586b 100644 --- a/src/update.rs +++ b/src/update.rs @@ -437,6 +437,7 @@ pub fn self_update() -> Result { /// Background update check: only surface availability and release notes. /// Runs in a background thread at startup. pub fn auto_update(events: tokio::sync::mpsc::Sender) { + crate::logging::update_check_started(); if let Ok(version) = env::var(FAKE_UPDATE_VERSION_ENV) { let version = version.trim(); if !version.is_empty() { @@ -459,9 +460,14 @@ pub fn auto_update(events: tokio::sync::mpsc::Sender) { let release = match check_latest() { Ok(Some(r)) => r, - _ => return, // up to date or failed — silently do nothing + Ok(None) => return, + Err(err) => { + crate::logging::update_check_failed(&err); + return; + } }; + crate::logging::update_available(&release.version.to_string()); tracing::info!( "new version v{} available at {}", release.version, -- cgit v1.2.3