You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is real, and described in the docs, at Criterion::Age.
On unix (and Mac), the filesystems maintains only a LAST_MODIFIED_AT, not a CREATED_AT property of files. On Windows, there is a CREATED_AT property, but Windows does a weird trick to make it unusable for our case. So flexi_logger "invents" the value for CREATED_AT for the first file (it uses the current timestamp).
With many short program runs, using Criterion::Size for rotation might be a better way out, or disabling append.
Ah damn! Very sorry to have troubled you in that case - I should have spotted that in the docs.
As it happens I was just playing further and had discovered that it works perfectly as expected if I use size as a criterion - exactly like you said, so I'll switch to that method.
Thank you for the prompt reply though, and for the excellent crate.
I have the logger setup:
...in a binary which is not long running, and instead is called multiple times via CLI commands.
The
.append
works fine, a log file is created in the expected dir, and all program logs are appended therein.However the rotation doesn't appear to take effect whatsoever.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: