Serilog.Sinks.File.FileLifecycleHooks
Enables hooking into log file lifecycle events.
Hooks run synchronously and therefore may affect responsiveness of the application if long operations are performed.
protected FileLifecycleHooks()
Called before an obsolete (rolling) log file is deleted.
This can be used to copy old logs to an archive location or send to a backup server.
Initialize or wrap the underlyingStream opened on the log file. This can be used to write
file headers, or wrap the stream in another that adds buffering, compression, encryption, etc. The underlying
file may or may not be empty when this method is called.
Initialize or wrap the underlyingStream opened on the log file. This can be used to write
file headers, or wrap the stream in another that adds buffering, compression, encryption, etc. The underlying
file may or may not be empty when this method is called.
Creates a chain of FileLifecycleHooks that have their methods called sequentially
Can be used to compose FileLifecycleHooks together; e.g. add header information to each log file and
compress it.