-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default fields added by serilog to splunk #62
Comments
Hi @sksksksksksk, Some options are available such as turning off template rendering.
Checkout the sample at https://github.com/serilog/serilog-sinks-splunk/blob/dev/sample/Sample/Program.cs#L177 I think the other you mentioned would be new features, they would not be hard to achieve however would stay enabled by default. The easier way to customised the event in Splunk is to extend/override the JSON formatter used. The default uses the package's JSON formatter and could be extended to achieve what you are looking for. |
The above code is able to modify console output but is not logging anything to splunk. Why would that be? |
@sksksksksksk sorry just got back to this one. I have not had a chance to test your example. It is possible, however that the formatter in the example above is not respecting the payload Splunk is expecting. There is a SplunkJsonFormatter that is used internally to achieve this. Details are here. |
Ok.. thanks.. It's working now... The format was a little messed up. I corrected it. |
👍 |
Is there any way to remove the default fields such as level, template etc. added by serilog while logging data to splunk.
The text was updated successfully, but these errors were encountered: