-
Notifications
You must be signed in to change notification settings - Fork 130
FileLifecycleHooks
#80
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
Merged
Changes from 4 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f7bfe4e
Enabled FileSink and RollingFileSink's output stream in another strea…
cocowalla 9eee731
Rename StreamWrapper to FileLifecycleHooks
cocowalla 83d817f
Ignore Rider cache/options files
cocowalla 63c3601
Add docs re wrapped stream ownership
cocowalla fca6eb9
Check for directory existence before attempting access.
billrob 0c65484
Merge pull request #88 from billrob/dev
nblumhardt e604418
Improve log message when FileLifecycleHooks provided for a shared log…
cocowalla 873f6d4
Throw clear exception when wrapping the output stream returns null
cocowalla e310ab9
Throw when using hooks with a shared file
cocowalla 1864db1
Merge branch 'feature/stream-wrapper' of https://github.com/cocowalla…
nblumhardt b660b51
Make FileSink constructor changes non-breaking; fix a bug whereby a s…
nblumhardt b904968
Reenable an old test that was lost
nblumhardt b6090cc
A test for the encoding fix
nblumhardt 34344ad
Move FileLifecycleHooks down under Serilog.Sinks.File - avoids namesp…
nblumhardt 0ae234e
Enable hooks and encoding for auditing methods
nblumhardt 55fcb2b
Add backwards-compatible configuration overloads
nblumhardt d4fa80a
Expose encoding to OnOpened() hook; switch to AppVeyor Linux builds
nblumhardt 9f7352d
Fix Linux build script targets
nblumhardt ca0ac8c
Test for header writing
nblumhardt 5b3d64a
OnOpened() -> OnFileOpened()
nblumhardt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
|
|
||
| namespace Serilog | ||
| { | ||
| using System.IO; | ||
|
|
||
| /// <summary> | ||
| /// Enables hooking into log file lifecycle events | ||
| /// </summary> | ||
| public abstract class FileLifecycleHooks | ||
| { | ||
| /// <summary> | ||
| /// Wraps <paramref name="underlyingStream"/> in another stream, such as a GZipStream, then returns the wrapped stream | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Serilog is responsible for disposing of the wrapped stream | ||
| /// </remarks> | ||
| /// <param name="underlyingStream">The underlying log file stream</param> | ||
| /// <returns>The wrapped stream</returns> | ||
| public abstract Stream Wrap(Stream underlyingStream); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.