Skip to content

Conversation

@DeRuina
Copy link
Owner

@DeRuina DeRuina commented May 8, 2025

Summary

This PR updates log rotation to use the creation time of the log file (when it was first opened) as the timestamp in the rotated filename. Previously, the timestamp reflected the moment the file was renamed during rotation.

Why This Matters

  • More accurate representation of the log period.
  • Better support for systems that ingest logs by time windows (e.g. ELK, Loki).
  • Avoids confusing filenames that actually contain data from the previous day.

Behavior Before

Rotated filename used the time of rotation.

Behavior After

Rotated filename uses the time the log file was created (logStartTime).

Backward Compatibility

Fully backward-compatible. No changes to configuration. The only visible change is the rotated filename format.

@DeRuina DeRuina merged commit 3d87292 into main May 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants