serilog-contrib / serilog-sinks-splunk

A Serilog sink that writes to Splunk
https://splunk.com
Apache License 2.0
46 stars 47 forks source link

EventCollector should support HttpClientHandler for ServerCertificateValidationCallback #158

Closed vinayp0812 closed 6 months ago

vinayp0812 commented 2 years ago

We don't want bypass certificate validation on global level. Please provide the support for handling this to specific http request.

Please find the below snippet for with serilog -

Log.Logger = new LoggerConfiguration().Enrich.WithProperty("RequestId", _requestId).Enrich.WithProperty("Environment", _environment) .MinimumLevel.Information() .WriteTo.Console() .WriteTo.EventCollector("xyz", "abc", source: "Machine", sourceType: "sourceApp1", host: "AWS Lambda", index: "appIndex") .CreateLogger();

EEParker commented 6 months ago

This can be handled with the HttpMessageHandler parameter of .WriteTo.EventCollector