SplunkLogger
SplunkLogger copied to clipboard
Add option to pass a HttpMessageHandler to the HttpClient
This change allow to optionally pass a HttpMessageHandler to the used HttpClient inside the logger. Example:
var config = builder.Configuration.GetSection("Splunk").Get<SplunkLoggerConfiguration>();
var handler = new HttpClientHandler
{
Proxy = new WebProxy("http://localhost:8080")
};
builder.Logging.AddProvider(new SplunkHECJsonLoggerProvider(config, null, handler));
To control, how the http client behaves and allows different use cases like adding a proxy, config ssl validation, ....