You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use this buffered, async, delegating, sink to reduce the time it takes for your app to write your log events to your sinks. This sink can work with any `IEventLogSink` you use.
3
+
Use this buffered, async, delegating, sink to reduce the time it takes for your app to write your log events to your sinks. This sink can work with any `ILogEventSink` you use.
5
4
6
-
Especially suited to sinks that are either slow to write or have I/O bottlenecks (like http, databases, file writes etc.).
7
-
This sink uses a separate thread pool thread to write to your sink, freeing up the calling thread to run in your app without having to wait.
5
+
Especially suited to non-batching sinks that are either slow to write or have I/O bottlenecks (like http, databases, file writes etc.).
8
6
9
-
Utilizes the producer/consumer pattern (using the TPL `BufferBlock<T>` class), where the calling thread produces log events (on your main thread), and the consumer runs on a thread pool thread consuming log events and writing them to your sink.
7
+
This sink uses a separate worker thread to write to your sink, freeing up the calling thread to run in your app without having to wait.
10
8
11
9
Install from NuGet:
12
10
@@ -18,23 +16,22 @@ Add this sink to your pipeline:
18
16
19
17
```csharp
20
18
Log.Logger=newLoggerConfiguration()
21
-
.WriteTo.Async(x=>x.Sink(newYourSink()))
19
+
.WriteTo.Async(x=>x.YourSink())
22
20
// Other logger configuration
23
21
.CreateLogger()
24
22
```
25
23
26
-
Now `YourSink` willwritemessagesusinganother [threadpool] threadwhileyourloggingthreadgetsonwithmoreimportantstuff.
24
+
Now `YourSink` willwritemessagesusingaworkerthreadwhileyourapplicatointhreadgetsonwithmoreimportantstuff.
0 commit comments