commit 15aa29bc75420fc07ff9de8bde8c136fbb6b242b
parent 2b84ee1f93f385ce07927e208557a5384af64dd6
Author: William Casarin <jb55@jb55.com>
Date: Thu, 19 Feb 2026 12:22:33 -0800
fix support section: load logs on view and limit log file growth
refresh() was never called, so the support view always showed
"Could not find logs". Also switch to RollingFileAppender builder
with max_log_files(3) to prevent unbounded log accumulation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat:
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/crates/notedeck_chrome/src/notedeck.rs b/crates/notedeck_chrome/src/notedeck.rs
@@ -25,11 +25,13 @@ fn setup_logging(path: &DataPath) -> Option<WorkerGuard> {
rolling::{RollingFileAppender, Rotation},
};
- let file_appender = RollingFileAppender::new(
- Rotation::DAILY,
- log_path,
- format!("notedeck-{}.log", env!("CARGO_PKG_VERSION")),
- );
+ let file_appender = RollingFileAppender::builder()
+ .rotation(Rotation::DAILY)
+ .filename_prefix(format!("notedeck-{}", env!("CARGO_PKG_VERSION")))
+ .filename_suffix("log")
+ .max_log_files(3)
+ .build(log_path)
+ .expect("failed to initialize rolling file appender");
let (non_blocking, _guard) = non_blocking(file_appender);
diff --git a/crates/notedeck_columns/src/nav.rs b/crates/notedeck_columns/src/nav.rs
@@ -850,6 +850,7 @@ fn render_nav_body(
DragResponse::none()
}
Route::Support => {
+ app.support.refresh();
SupportView::new(&mut app.support, ctx.i18n).show(ui);
DragResponse::none()
}