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

Allow setting a proxy #32

Closed Wedvich closed 8 years ago

Wedvich commented 8 years ago

I'm currently working on a project for a client where all outbound HTTP calls need to go through a proxy server. I see that an HttpClient is used internally in the sink, but there's no injection point for a HttpMessageHandler anywhere. I suggest another optional parameter in the EventCollector constructor and extension method: proxyAddress, which is exactly what it looks like. This can then be passed in to the EventCollectorClient constructor and be used to create a HttpClientHandler using the provided proxy.

I'd be happy to create a PR for this.

merbla commented 8 years ago

@Wedvich sounds great. Similar to https://github.com/serilog/serilog-sinks-splunk/issues/26 we need to open up HttpMessageHandler

merbla commented 8 years ago

Perhaps similar to the Seq sink? https://github.com/serilog/serilog-sinks-seq/blob/dev/src/Serilog.Sinks.Seq/Sinks/Seq/SeqSink.cs#L53

merbla commented 8 years ago

Great work @Wedvich now to get a release out.