AzureBlobSink AzureBlobSink Class

Definition

The implemenation that stores messages by appending them to Azure Blob in batches.

public class AzureBlobSink : PeriodicBatchingSink, ILogEventSink, IDisposable
Public Class AzureBlobSink
    Inherits PeriodicBatchingSink
    Implements ILogEventSink, IDisposable
Inheritance
Serilog.Sinks.PeriodicBatching.PeriodicBatchingSinkSerilog.Sinks.PeriodicBatching.PeriodicBatchingSink
AzureBlobSinkAzureBlobSink
Implements
Serilog.Core.ILogEventSinkSerilog.Core.ILogEventSink IDisposableIDisposable

Constructors

AzureBlobSink(Func, String, String, ITextFormatter, Int32, TimeSpan) AzureBlobSink(Func(Of String, ICloudAppendBlob), String, String, ITextFormatter, Int32, TimeSpan)

Creates a new instance of

public AzureBlobSink(Func<string, ICloudAppendBlob> blobReferenceFactory, string appName, string fileName, ITextFormatter formatter, int batchSizeLimit, TimeSpan period)
Public Sub New(blobReferenceFactory As Func(Of String, ICloudAppendBlob), appName As String, fileName As String, formatter As ITextFormatter, batchSizeLimit As Integer, period As TimeSpan)
Parameters
blobReferenceFactory
Func<String, ICloudAppendBlob> Func(Of String, ICloudAppendBlob)

The container to store logs to.

appName
String String

The application name to use in blob path generation.

fileName
String String

The last segment of blob name.

formatter
Serilog.Formatting.ITextFormatter Serilog.Formatting.ITextFormatter

The for log messages.

batchSizeLimit
Int32 Int32

The maximum number of events to include in a single batch.

period
TimeSpan TimeSpan

The time to wait between checking for event batches.

Methods

CanInclude(LogEvent) CanInclude(LogEvent)

Inherited from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink

Dispose() Dispose()

Inherited from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink

Dispose(Boolean) Dispose(Boolean)

Inherited from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink

Emit(LogEvent) Emit(LogEvent)

Inherited from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink

EmitBatch(IEnumerable) EmitBatch(IEnumerable(Of LogEvent))

Inherited from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink

EmitBatchAsync(IEnumerable) EmitBatchAsync(IEnumerable(Of LogEvent))

protected override Task EmitBatchAsync(IEnumerable<LogEvent> events)
Protected Overrides Function EmitBatchAsync(events As IEnumerable(Of LogEvent)) As Task
Parameters
events
IEnumerable<Serilog.Events.LogEvent> IEnumerable(Of Serilog.Events.LogEvent)
Returns
Overrides
Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.EmitBatchAsync(System.Collections.Generic.IEnumerable<Serilog.Events.LogEvent>)Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.EmitBatchAsync(System.Collections.Generic.IEnumerable<Serilog.Events.LogEvent>)

Equals(Object) Equals(Object)

Inherited from Object

Equals(Object, Object) Equals(Object, Object)

Inherited from Object

GetHashCode() GetHashCode()

Inherited from Object

GetType() GetType()

Inherited from Object

MemberwiseClone() MemberwiseClone()

Inherited from Object

OnEmptyBatch() OnEmptyBatch()

Inherited from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from Object

ToString() ToString()

Inherited from Object