AlanBarber / NLog.Targets.Splunk

A NLog target for Splunk Http Event Collector (HEC) Sender
Apache License 2.0
9 stars 24 forks source link

Possible to get rid of the “Properties” wrap? #52

Open gunnarsteing opened 3 years ago

gunnarsteing commented 3 years ago

When use the nlog configuration with:

or if I have:

includeEventProperties="false" and use:

    <contextproperty name="threadid" layout="${threadid}" />
    <contextproperty name="logger" layout="${logger}" />

I get the logs in the following format (properties wrapped in "Properties"):

{"Level":"Info","MessageTemplate":"ApiRequest","RenderedMessage":"ApiRequest","Properties":{"httpMethod":"GET","statusCode":200}, ...}

Is it possible to get rid of the Properties-wrap, and have it more flat? { "Level": "Info", "httpMethod": "GET", "statusCode":200, ... }

Wrapping it in "Properties" makes it less readable in splunk (it's tedious to manually expand properties all the time).