Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update File Retention Policy #43

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ritasker
Copy link

Fixes #42

Uses pattern matching to select only the files in the directory that have a similar pattern to the current sinks filename.

Moves the file retention code to a common class used by both the HourlyRollingFileSink & AlternateRollingFileSink.

New tests added and pass.

@jchannon
Copy link

Hit an issue today that its not deleting files/rolling over files in order. Can we get this merged in and released ASAP please

-rwxr--r-- 1 root root 30720039 Aug 21 21:38 vqservice-20170821-00075.log
-rwxr--r-- 1 root root 30720112 Aug 21 21:42 vqservice-20170821-00078.log
-rwxr--r-- 1 root root 30720035 Aug 21 21:46 vqservice-20170821-00081.log
-rwxr--r-- 1 root root 30720035 Aug 21 21:47 vqservice-20170821-00082.log
-rwxr--r-- 1 root root 30720082 Aug 21 21:58 vqservice-20170821-00089.log
-rwxr--r-- 1 root root 30720163 Aug 21 22:03 vqservice-20170821-00093.log
-rwxr--r-- 1 root root 30720047 Aug 21 22:06 vqservice-20170821-00095.log
-rwxr--r-- 1 root root 30720204 Aug 21 22:13 vqservice-20170821-00100.log

@nblumhardt
Copy link
Contributor

If it helps, I've implemented date/size rolling in: serilog/serilog-sinks-file#35

Needs a review/merge; after that, some help testing the results would be appreciated.

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.

None yet

3 participants