Skip to content
Discussion options

You must be logged in to vote

@phreakazoid21

Hi,

No, interval rotation does not persist across restarts.

RotationInterval is evaluated in memory against lastRotationTime, which is initialized when the Logger instance starts and performs its first write. That value is not persisted to disk, so restarting your service effectively resets the interval timer.

In your example:

  • Service starts
  • RotationInterval = 7 days
  • 2 days later you restart the server

Timberjack will rotate 7 days from the restart (or first write after restart) — not 5 days later.

If you need rotation aligned to real clock time (for example, rotate every day at midnight or at specific times regardless of restarts), use:

  • RotateAtMinutes
  • or RotateAt (e.g. "…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DeRuina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants