Skip to content

Commit b7aef2e

Browse files
authored
Merge pull request #5 from hmvs/processqueueondispose
ProcessQueue on dispose
2 parents 9ecd065 + 834b73a commit b7aef2e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Serilog.Sinks.Exceptionless/Sinks/Exceptionless/ExceptionlessSink.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Serilog.Sinks.Exceptionless {
77
/// <summary>
88
/// Exceptionless Sink
99
/// </summary>
10-
public class ExceptionlessSink : ILogEventSink {
10+
public class ExceptionlessSink : ILogEventSink, IDisposable {
1111
private readonly Func<EventBuilder, EventBuilder> _additionalOperation;
1212
private readonly bool _includeProperties;
1313

@@ -90,5 +90,9 @@ public void Emit(LogEvent logEvent) {
9090

9191
builder.Submit();
9292
}
93+
94+
void IDisposable.Dispose() {
95+
_client?.ProcessQueue();
96+
}
9397
}
9498
}

0 commit comments

Comments
 (0)