BackgroundSink BackgroundSink Class

Definition

A background sink for Serilog.

public class BackgroundSink : ILogEventSink, IDisposable
Public Class BackgroundSink
    Implements ILogEventSink, IDisposable
Inheritance
BackgroundSinkBackgroundSink
Implements
Serilog.Core.ILogEventSinkSerilog.Core.ILogEventSink IDisposableIDisposable

Constructors

BackgroundSink(ILogEventSink, Nullable) BackgroundSink(ILogEventSink, Nullable(Of Int32))

Creates a new instance of the class.

public BackgroundSink(ILogEventSink innerSink, int ? maxQueueSize)
Public Sub New(innerSink As ILogEventSink, maxQueueSize As Integer?)
Parameters
innerSink
Serilog.Core.ILogEventSink Serilog.Core.ILogEventSink

The inner sink which does the actual logging

maxQueueSize
System.Nullable<Int32> System.Nullable(Of Int32)

The maximum size of the background queue

Fields

DefaultLogMessagesQueueSize DefaultLogMessagesQueueSize

The default queue size.

public const int DefaultLogMessagesQueueSize = 1024
Public Const DefaultLogMessagesQueueSize As Integer = 1024

Methods

Dispose() Dispose()

Disposes this object instance.

public virtual void Dispose()
Public Overridable Sub Dispose

Emit(LogEvent) Emit(LogEvent)

public void Emit(LogEvent logEvent)
Public Sub Emit(logEvent As LogEvent)
Parameters
logEvent
Serilog.Events.LogEvent 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

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

Inherited from Object

ToString() ToString()

Inherited from Object