AlanBarber / log4net.Appender.Splunk

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

Customize layout or add properties? #18

Closed VictorioBerra closed 3 years ago

VictorioBerra commented 3 years ago

Whatever I do to the layout seems to be completely ignored when it gets into Splunk.

I need to add method, type, line, custom properties on LogicalThreadContext to the JSON that gets sent to Splunk.

Is there a way to tell this appender to pull those in?

VictorioBerra commented 3 years ago

Looking through the code now, it seems like logEvent.RenderedMessage should be the final message after going through the layout stuff but in my Splunk instance, but its not. When I get it, this is what I see:

image

AlanBarber commented 3 years ago

Can you share how your log4net config is setup?

VictorioBerra commented 3 years ago

I ended up switching to Serilog. Thanks for your reply though @AlanBarber