Serilog.Sinks.AmazonS3
|
AmazonS3Sink Constructor
Initializes a new instance of the [AmazonS3Sink] class.
Namespace:
Serilog.Sinks.AmazonS3
Assembly:
Serilog.Sinks.AmazonS3 (in Serilog.Sinks.AmazonS3.dll)
Syntax
public AmazonS3Sink( ITextFormatter formatter, string path, Nullable<long> fileSizeLimitBytes, bool buffered, Encoding encoding, RollingInterval rollingInterval, Nullable<int> retainedFileCountLimit, FileLifecycleHooks hooks, string bucketName, RegionEndpoint endpoint, string awsAccessKeyId, string awsSecretAccessKey )
Public Sub New ( _ formatter As ITextFormatter, _ path As String, _ fileSizeLimitBytes As Nullable(Of Long), _ buffered As Boolean, _ encoding As Encoding, _ rollingInterval As RollingInterval, _ retainedFileCountLimit As Nullable(Of Integer), _ hooks As FileLifecycleHooks, _ bucketName As String, _ endpoint As RegionEndpoint, _ awsAccessKeyId As String, _ awsSecretAccessKey As String _ )
public: AmazonS3Sink( ITextFormatter^ formatter, String^ path, Nullable<long long^> fileSizeLimitBytes, bool^ buffered, Encoding^ encoding, RollingInterval^ rollingInterval, Nullable<int^> retainedFileCountLimit, FileLifecycleHooks^ hooks, String^ bucketName, RegionEndpoint^ endpoint, String^ awsAccessKeyId, String^ awsSecretAccessKey )
Parameters
- formatter
- Type: ITextFormatter
The formatter.
- path
- Type: String
The path.
- buffered
- Type: Boolean
if set to true [buffered].
- encoding
- Type: Encoding
The encoding.
- rollingInterval
- Type: Serilog.Sinks.AmazonS3..::..RollingInterval
The rolling interval.
- hooks
- Type: Serilog.Sinks.AmazonS3..::..FileLifecycleHooks
The hooks.
- bucketName
- Type: String
The Amazon S3 bucket name.
- endpoint
- Type: RegionEndpoint
The Amazon S3 endpoint.
- awsAccessKeyId
- Type: String
The Amazon S3 access key id.
- awsSecretAccessKey
- Type: String
The Amazon S3 secret access key.
Return Value
A [LoggerConfiguration] to use with Serilog.Exceptions
Exception | Condition |
---|---|
[ArgumentNullException] | addSink or formatter or path |
[ArgumentException] | Negative value provided; file size limit must be non-negative. - fileSizeLimitBytes or At least one file must be retained. - retainedFileCountLimit or Buffered writes are not available when file sharing is enabled. - buffered or File lifecycle hooks are not currently supported for shared log files. - hooks |