Skip to content

feat(backend): keep up to a week in the current log file and cap log history - #682

Merged
JuliusHenke merged 1 commit into
masterfrom
claude/project-thread-whyd3o
Nov 4, 2026
Merged

JuliusHenke merged 1 commit into
masterfrom
claude/project-thread-whyd3o

Conversation

@JuliusHenke

Copy link
Copy Markdown
Member

Requested by ju · project thread

Summary

/actuator/logfile only serves the current log file. That file used to roll over daily, so the weekly import health check could only see the logs since midnight. Archived logs were also never deleted.

  • The file now rolls over weekly, so the endpoint shows up to a week of logs. It still rolls early at 10 MB, as before.
  • The pattern uses YYYY-ww (week-based year). I checked this with logback 1.5.38: yyyy-ww would name the files for 2026-12-27 to 12-31 2026-01 and collide with January 2026.
  • Archived logs are kept for maxHistory 13 (logback counts this in rollover periods, here weeks, so about 90 days), capped at 1 GB with totalSizeCap.

Weeks start on the JVM locale's first day of the week (Sunday for en_US). At the start of a week the current file only holds a day or two.

Testing

  • RollingCalendar detects YYYY-ww as TOP_OF_WEEK. Across the 2026/2027 year boundary, files are named 2026-52, then 2027-01, then 2027-02.
  • I loaded the config with JoranConfigurator. It logs without warnings or errors, and the status output confirms totalSizeCap 1 GB.

Deployment notes

No action required. The old daily archives (logs/archived/spring-boot-logger-YYYY-MM-DD.N.log) don't match the new pattern, so logback won't delete them and they don't count towards the 1 GB cap. Delete them by hand if you want the space back.


Generated by Claude Code

…history

Roll the log file weekly instead of daily (still at 10 MB at most), so
/actuator/logfile shows up to a week of logs. Keep 13 weeks (about 90
days) of archived logs, capped at 1 GB; before, archives were never
deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SWRrkPxjD9vpVSdEeCvnXX
@JuliusHenke JuliusHenke added enhancement New feature or request backend labels Nov 4, 2026 — with Claude
@JuliusHenke JuliusHenke self-assigned this Nov 4, 2026
@JuliusHenke
JuliusHenke merged commit 60974c2 into master Nov 4, 2026
15 checks passed
@JuliusHenke
JuliusHenke deleted the claude/project-thread-whyd3o branch November 4, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants