-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Layout doesn't seem to control formatting #35
Comments
The Layout is hard coded just |
Yeah, I can see how this might be useful. The original was designed with assumptions about what info should be sent into the splunk logs. I'll start some research into what it would take to rework this around the JsonLayout component. |
Hello, Has this been implemented? We were looking at using this package however it does not allow us to format our messages the way we need to for our organization. |
If you need special formatting you can try my NLog.Targets.HTTP combined with JSON Formatter. https://www.nuget.org/packages/NLog.Targets.Http/ |
I'm trying to use the following target Layout to get NLog to send the message verbatim, but it still wraps it in a bunch of unnecessary data... The same target Layout works fine for file logging.
_splunkTarget = new SplunkHttpEventCollector() {
ServerUrl = new Uri(SplunkURL),
Token = SplunkHecToken,
Channel = SplunkHecToken,
RetriesOnError = 1,
MaxConnectionsPerServer = 20,
Layout = "${message}"
};
The text was updated successfully, but these errors were encountered: