Skip to content

Allow FileLifecycleHooks to change the length of the stream #187

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

Merged

Conversation

augustoproiete
Copy link
Member

@augustoproiete augustoproiete commented Nov 4, 2020

  • Open files with FileMode.OpenOrCreate and immediately position the cursor at the end of the file, effectively doing what the File class does behind the scenes when using FileMode.Append

  • Implement SetLength in WriteCountingStream adjusting CountedLength if necessary (i.e. when the new size of the stream is shorter)


Resolves… #186

@augustoproiete augustoproiete force-pushed the allow-hooks-to-set-stream-length branch 2 times, most recently from 8309d92 to 3c85b0e Compare November 12, 2020 00:51
@augustoproiete augustoproiete force-pushed the allow-hooks-to-set-stream-length branch from 3c85b0e to 7e65244 Compare November 12, 2020 00:55
@nblumhardt nblumhardt merged commit a2fa447 into serilog:dev Jun 22, 2021
@nblumhardt
Copy link
Member

👍

@augustoproiete augustoproiete deleted the allow-hooks-to-set-stream-length branch June 22, 2021 03:31
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