fix(logs): apply log settings from the first line and name the locking variable
The desktop opened its log files with the default limits and wrote its first line, which prunes, before Settings › Advanced › Logs were applied. Every start, and every launch that only hands its file to the running Chronos, deleted logs older than 14 days and cut the folder to 1 GB whatever the user kept. AppLogging.Open now builds the sink from the stored settings before that line; the settings are read again once the launch owns the data folder. A total below one file deleted each finished file as the next one opened. The rule now lives in LogFileOptions.TotalBelowFile: the server keeps refusing it, the desktop raises the total to the file size and its rows no longer offer the combination. The desktop log rows threw on negative sizes from an imported or hand-edited file and showed raw values the files never got; they now show the applied ones. Upgraded Unraid and compose installs keep CHRONOS_LOG_LEVEL=Information, which locks both levels. The lock stays; the server now reports which variable fixes each locked setting (LockedBy), so the panel's tooltip names it exactly and says to remove it to change the value there. The releases README tells upgraders. The former-constructor log test no longer fails across midnight UTC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 8ba7162bd5926d34c5ec4e40e2a2dad063ee19c3)
This commit is contained in:
1 parent
8d66be709c
commit
ac121acf7c
53 files changed
+254
-92
No files matched your search
@@ -2,7 +2,8 @@ namespace Chronos.Protocol;
|
||||
|
||||
/// <summary>
|
||||
/// <c>GET/PUT /api/v1/server/settings</c> (admin): the editable part of the server configuration. Settings named in
|
||||
/// <see cref="Locked"/> come from environment variables and cannot be changed here; <see cref="RestartRequired"/> says
|
||||
/// <see cref="Locked"/> come from environment variables and cannot be changed here; <see cref="LockedBy"/> names the
|
||||
/// variable that fixes each of them (ignored when saving); <see cref="RestartRequired"/> says
|
||||
/// that saved values (ports, TLS, chunk size) wait for a restart; <see cref="JobHistoryDays"/> is what the housekeeping
|
||||
/// schedule is reset to (owner review 2, R10). <see cref="ProxyWarning"/> is set in responses when TLS mode is proxy and
|
||||
/// the request did not come through a trusted proxy over HTTPS (ignored when saving).
|
||||
@@ -29,6 +30,7 @@ public sealed record ServerSettingsDto(
|
||||
int UploadRetentionHours,
|
||||
LogSettingsDto Logs,
|
||||
IReadOnlyList<string> Locked,
|
||||
IReadOnlyDictionary<string, string> LockedBy,
|
||||
bool RestartRequired,
|
||||
bool ProxyWarning);
|
||||
|
||||
|
||||
Reference in new issue
Block a user