FileSink Constructor

Serilog Sinks AmazonS3

Serilog.Sinks.AmazonS3

FileSink Constructor

Initializes a new instance of the [FileSink] class.

Namespace:  Serilog.Sinks.AmazonS3
Assembly:  Serilog.Sinks.AmazonS3 (in Serilog.Sinks.AmazonS3.dll)

Syntax


public FileSink(
	string path,
	ITextFormatter textFormatter,
	Nullable<long> fileSizeLimitBytes,
	Encoding encoding,
	bool buffered,
	FileLifecycleHooks hooks
)
Public Sub New ( _
	path As String, _
	textFormatter As ITextFormatter, _
	fileSizeLimitBytes As Nullable(Of Long), _
	encoding As Encoding, _
	buffered As Boolean, _
	hooks As FileLifecycleHooks _
)
public:
FileSink(
	String^ path, 
	ITextFormatter^ textFormatter, 
	Nullable<long long^> fileSizeLimitBytes, 
	Encoding^ encoding, 
	bool^ buffered, 
	FileLifecycleHooks^ hooks
)

Parameters

path
Type: String
The path.
textFormatter
Type: ITextFormatter
The text formatter.
fileSizeLimitBytes
Type: Nullable<(Of <(<'Int64>)>)>
The file size limit bytes.
encoding
Type: Encoding
The encoding.
buffered
Type: Boolean
if set to true [buffered].
hooks
Type: Serilog.Sinks.AmazonS3..::..FileLifecycleHooks
The hooks.

Exceptions


ExceptionCondition
[ArgumentNullException] path or textFormatter
[ArgumentException]Negative value provided; file size limit must be non-negative.
[InvalidOperationException]The file lifecycle hook FileLifecycleHooks.OnFileOpened.