Skip to content

Commit bab12ba

Browse files
Coleman, ChristopherColeman, Christopher
authored andcommitted
Log failiures to post to Splunk to the Debug window, as well as cathing the exception that exited the post loop.
1 parent 23e5c24 commit bab12ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ColeSoft.Extensions.Logging.Splunk/Hec/SplunkProviderBase.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ private async Task SendToSplunkInternalAsync(IReadOnlyList<string> messages)
160160
{
161161
await SendToSplunkAsync(messages);
162162
}
163+
catch (Exception e)
164+
{
165+
Debug.Write(e, "Failed to send log messages to Splunk");
166+
}
163167
finally
164168
{
165169
httpClientSemaphore.Release();

0 commit comments

Comments
 (0)