feat(logs): log level, retention, size limits and rotation on server and desktop

Owner review 2, R11 asked for more log settings. The file sink now writes daily or
hourly files, continues a full file in numbered parts and prunes by age and by the
total size (never the file being written); its options change while it runs.

Server: the file and console levels are separate and read by the logging filters
at every line, so the admin panel's new Logs group applies without a restart; the
engine's level follows the lower of the two. This also fixes a bug: the file logger
was fixed at Information, so CHRONOS_LOG_LEVEL=Debug or Trace never reached the
files. New variables CHRONOS_LOG_CONSOLE_LEVEL, CHRONOS_LOG_RETENTION_DAYS,
CHRONOS_LOG_MAX_FILE_MB, CHRONOS_LOG_MAX_TOTAL_MB, CHRONOS_LOG_ROTATION,
CHRONOS_AUDIT_RETENTION_DAYS and CHRONOS_DIAGNOSTICS_LOG_MB lock their settings like
the others; the diagnostics zip keeps the configured share of each log.

Desktop: Settings > Advanced gains Log level, Keep logs, File size, Logs total,
Rotation and Diagnostics logs, applied at every save; Advanced's Reset section
restores them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit cc875784e4952ee0e4c807b9d9c18496d3d5a8c3)
This commit is contained in:
Alby96 committed 2026-10-27 02:08:09 +01:00
1 parent 1f089888e8
commit 0e84392f4f
35 files changed
+1485 -119

No files matched your search

+6
View File
@@ -558,6 +558,7 @@
<data name="Tooltips.Settings.DeepAfterScan" xml:space="preserve"><value>Sequences a scan finds (adopted folders, new sidecars) also get a deep analysis, in the background</value></data>
<data name="Tooltips.Settings.DefaultServer" xml:space="preserve"><value>Server Chronos connects to at start; changing it signs out · Enter applies, Esc reverts</value></data>
<data name="Tooltips.Settings.Diagnostics" xml:space="preserve"><value>Zip the logs, a system and codec report, settings and recent failed jobs into a folder you choose; passwords, tokens and photos are left out</value></data>
<data name="Tooltips.Settings.DiagnosticsLogs" xml:space="preserve"><value>How much of the end of each log file the diagnostics bundle includes</value></data>
<data name="Tooltips.Settings.EarlierData" xml:space="preserve"><value>Open the data this portable copy kept beside it before it ran from OneDrive. Chronos no longer uses it and leaves it as it is</value></data>
<data name="Tooltips.Settings.Export" xml:space="preserve"><value>Save every setting as JSON, without the session token</value></data>
<data name="Tooltips.Settings.FileTemplate" xml:space="preserve"><value>File name of each frame, for example {date}_{time}_{n:0000}; the extension is added · Enter applies, Esc reverts</value></data>
@@ -569,9 +570,13 @@
<data name="Tooltips.Settings.KeepArchiveSettings" xml:space="preserve"><value>Leave this archive's settings as they are</value></data>
<data name="Tooltips.Settings.KeepCache" xml:space="preserve"><value>Keep the cache as it is</value></data>
<data name="Tooltips.Settings.KeepIndex" xml:space="preserve"><value>Keep the index as it is</value></data>
<data name="Tooltips.Settings.KeepLogs" xml:space="preserve"><value>Log files last written longer ago are deleted</value></data>
<data name="Tooltips.Settings.KeepSettings" xml:space="preserve"><value>Keep every setting as it is</value></data>
<data name="Tooltips.Settings.Language" xml:space="preserve"><value>Language of the interface · applies immediately</value></data>
<data name="Tooltips.Settings.LogFileSize" xml:space="preserve"><value>A log file that reaches this size continues in a new numbered file</value></data>
<data name="Tooltips.Settings.LogLevel" xml:space="preserve"><value>Least severe level written to the log files; Debug and Trace help find problems but fill the files fast</value></data>
<data name="Tooltips.Settings.LogsFolder" xml:space="preserve"><value>Daily log files, kept for 14 days</value></data>
<data name="Tooltips.Settings.LogsTotal" xml:space="preserve"><value>When the log files together exceed this size, the oldest are deleted, never the one being written</value></data>
<data name="Tooltips.Settings.Memory" xml:space="preserve"><value>Frames stay in memory up to this budget, then spill to the cache folder</value></data>
<data name="Tooltips.Settings.MemoryAuto" xml:space="preserve"><value>Auto: a quarter of installed memory</value></data>
<data name="Tooltips.Settings.MemoryReset" xml:space="preserve"><value>Back to Auto: a quarter of installed memory</value></data>
@@ -611,6 +616,7 @@
<data name="Tooltips.Settings.RestoreCancel" xml:space="preserve"><value>Keep the current index at the next start</value></data>
<data name="Tooltips.Settings.RestoreConfirm" xml:space="preserve"><value>At the next start of Chronos, back up the current index and then restore this backup</value></data>
<data name="Tooltips.Settings.RestorePending" xml:space="preserve"><value>The chosen backup replaces the index when Chronos starts next</value></data>
<data name="Tooltips.Settings.Rotation" xml:space="preserve"><value>Start a new log file every day or every hour (UTC)</value></data>
<data name="Tooltips.Settings.Search" xml:space="preserve"><value>Find a setting by name</value></data>
<data name="Tooltips.Settings.SelfTest" xml:space="preserve"><value>Encode a short synthetic clip with every encoder and report pass or fail and speed · about a minute</value></data>
<data name="Tooltips.Settings.SelfTestResult" xml:space="preserve"><value>Speed on the synthetic 1280×720 test clip</value></data>