AlanBarber / log4net.Appender.Splunk

A log4net appender for Splunk Http Event Collector (HEC) Sender
Apache License 2.0
7 stars 16 forks source link

Splunk URL path is ignored #24

Open noppo opened 1 year ago

noppo commented 1 year ago

Hello Thank you for your good work with this Appender

Just wanted to report an issue where the path part of parameter "ServerUrl" is ignored. In our Splunk setup it very important that the path is /services/collector/event However, in your code it seems the path is always overridden with a constant definde in "HttpEventCollectorPath"

So we changed: HttpEventCollectorSender.cs line 160 this.httpEventCollectorEndpointUri = new Uri(uri, HttpEventCollectorPath); We changed it to: this.httpEventCollectorEndpointUri = uri.ToString().Contains(HttpEventCollectorPath) ? uri : new Uri(uri, HttpEventCollectorPath);

This is working for us now, do you want to implement that in your code?

Jan