From cebafe021336752f75cdf92be17d20ad1d9d9ca0 Mon Sep 17 00:00:00 2001 From: teernisse Date: Fri, 13 Mar 2026 11:03:24 -0400 Subject: [PATCH] fix(logging): reduce file log level to info and cut retention to 7 days MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit File logging was set to DEBUG level unconditionally, causing log files to grow to 25-32GB each (200GB total across 8 files). The primary volume came from per-HTTP-request, per-entity, and per-chunk debug!() calls in the ingestion orchestrator, GitLab client, and embedding pipeline — all of which wrote JSON events to daily-rotated log files regardless of CLI verbosity flags. Two changes: - File filter: lore=debug,warn -> lore=info (eliminates ~90% of volume) - Default retention: 30 days -> 7 days (caps total disk usage) The info level still captures operational events (sync start/complete, rate limits, errors, embedding progress) while per-request instrumentation stays silent unless explicitly enabled via -vv/-vvv on stderr. --- src/core/config.rs | 2 +- src/core/logging.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/config.rs b/src/core/config.rs index 0dab260..711e4bb 100644 --- a/src/core/config.rs +++ b/src/core/config.rs @@ -175,7 +175,7 @@ pub struct LoggingConfig { } fn default_retention_days() -> u32 { - 30 + 7 } fn default_file_logging() -> bool { diff --git a/src/core/logging.rs b/src/core/logging.rs index 3481ee3..c55edd9 100644 --- a/src/core/logging.rs +++ b/src/core/logging.rs @@ -65,7 +65,7 @@ pub fn build_file_filter() -> EnvFilter { return EnvFilter::from_default_env(); } - EnvFilter::new("lore=debug,warn") + EnvFilter::new("lore=info") } pub fn cleanup_old_logs(log_dir: &Path, retention_days: u32) -> usize {