Open cotz1995 opened 5 years ago
yeah, I have a version for nlog that was cleaned up to do async and improved error handling. I've been meaning to get around to migrating the code over to this log4net version. I'll try to prioritize it for the next release.
any updates on this?
Currently, logs sent to HttpEventCollectorSender are flushed synchronously using FlushSync(). See https://github.com/AlanBarber/log4net.Appender.Splunk/blob/c5b5b68b4320c29bc037a4bf4f2411d28850bb18/src/log4net.Appender.Splunk/SplunkHttpEventCollector.cs#L81
I can see this is advantageous over fire and forget in that exceptions are not lost. However, if the http requests to the Splunk system hang so does the application. Moreover, I use a mock api (WireMock) and delayed the response by a significant amount of time. The entire app hangs on any logging calls. My suggestion is to use FlushAsync().
I'd be more than happy to make a pull request for this, but I currently don't have permissions to make new branches.
Thanks! Cory