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

Add OnFileRemoving life cycle hook #106 #107

Merged
merged 4 commits into from
Jul 16, 2019

Conversation

nogard111
Copy link

Add OnFileRemoving life cycle hook #106

@nogard111
Copy link
Author

If there is no more issues. Please Merge branch :)

Copy link
Member

@nblumhardt nblumhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Once we've figured out the general direction there's usually a round of nit-picking changes like this for docs etc. - I've added a few comments, let me know if you think any of these misses the mark.

src/Serilog.Sinks.File/Sinks/File/RollingFileSink.cs Outdated Show resolved Hide resolved
src/Serilog.Sinks.File/Sinks/File/FileLifecycleHooks.cs Outdated Show resolved Hide resolved
@nblumhardt
Copy link
Member

Thanks for the updates - this is looking good!

Did you have a chance to investigate how this might be tested? Here's an example of the other existing hook being tested: https://github.com/serilog/serilog-sinks-file/blob/dev/test/Serilog.Sinks.File.Tests/FileSinkTests.cs#L183 - and here's an example of a rolling test that deals with multiple file deletion: https://github.com/serilog/serilog-sinks-file/blob/dev/test/Serilog.Sinks.File.Tests/RollingFileSinkTests.cs#L56

@nogard111
Copy link
Author

Test added

@nblumhardt nblumhardt merged commit 9a0257e into serilog:dev Jul 16, 2019
@nblumhardt
Copy link
Member

Great! Thanks for the contribution 👍

This should be out as a -dev package soon.

@nblumhardt nblumhardt mentioned this pull request Oct 17, 2019
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.

4 participants