Class RealmDBSink
- Namespace
- Arc4u.Diagnostics.Serilog.Sinks.RealmDb
- Assembly
- Arc4u.Diagnostics.Serilog.Sinks.RealmDb.dll
A batched Serilog sink that persists the log events in a Realm database as LogDBMessage objects.
public class RealmDBSink : IBatchedLogEventSink
- Inheritance
-
RealmDBSink
- Implements
-
IBatchedLogEventSink
- Inherited Members
Constructors
RealmDBSink(RealmConfiguration)
Initializes a new instance of the RealmDBSink class.
public RealmDBSink(RealmConfiguration config)
Parameters
configRealmConfigurationThe configuration of the Realm database.
Methods
EmitBatchAsync(IEnumerable<LogEvent>)
Writes the events of the batch to the Realm database in one transaction. Events that cannot be converted are ignored.
public Task EmitBatchAsync(IEnumerable<LogEvent> events)
Parameters
eventsIEnumerable<LogEvent>The batch of events.
Returns
- Task
A task that completes when the batch has been written.
OnEmptyBatchAsync()
Called when no event is available; does nothing.
public Task OnEmptyBatchAsync()
Returns
- Task
A completed task.