NLog.Splunk 1.0.1

Splunk Target for NLog

Install-Package NLog.Splunk -Version 1.0.1
dotnet add package NLog.Splunk --version 1.0.1
<PackageReference Include="NLog.Splunk" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NLog.Splunk --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NLog.Splunk

Splunk target to send logs in splunk


Getting Started

Use the GUI or the following command in the Package Manager Console

Install-Package NLog.Splunk

Then add it to your solution

ConfigurationItemFactory.Default.Targets.RegisterDefinition("Splunk", typeof(SplunkTarget));

Configuration

For async configuration you can use with BufferingWrapper

<target xsi:type="BufferingWrapper" 
name="f" 
bufferSize="100" 
slidingTimeout="true" 
flushTimeout="10000" >
    <target xsi:type="Splunk"               
    layout="${longdate} | ${uppercase:${level}} | ${message} | ${exception}"
    host="{url-to-splunk}"
    username="{your-username}"
    password="{your-password}"
    index="{your-index}"
    source="{your-source}"
    sourceType="{your-source-type}"
    />
</target>

Otherwise you can use in normal way

<target xsi:type="Splunk" 
name="f"             
layout="${longdate} | ${uppercase:${level}} | ${message} | ${exception}"
host="{url-to-splunk}"
username="{your-username}"
password="{your-password}"
index="{your-index}"
source="{your-source}"
sourceType="{your-source-type}"
/>

Don't forget to add your rules

<logger name="*" minlevel="Info" writeTo="f" />

enter image description here

NLog.Splunk

Splunk target to send logs in splunk


Getting Started

Use the GUI or the following command in the Package Manager Console

Install-Package NLog.Splunk

Then add it to your solution

ConfigurationItemFactory.Default.Targets.RegisterDefinition("Splunk", typeof(SplunkTarget));

Configuration

For async configuration you can use with BufferingWrapper

<target xsi:type="BufferingWrapper" 
name="f" 
bufferSize="100" 
slidingTimeout="true" 
flushTimeout="10000" >
    <target xsi:type="Splunk"               
    layout="${longdate} | ${uppercase:${level}} | ${message} | ${exception}"
    host="{url-to-splunk}"
    username="{your-username}"
    password="{your-password}"
    index="{your-index}"
    source="{your-source}"
    sourceType="{your-source-type}"
    />
</target>

Otherwise you can use in normal way

<target xsi:type="Splunk" 
name="f"             
layout="${longdate} | ${uppercase:${level}} | ${message} | ${exception}"
host="{url-to-splunk}"
username="{your-username}"
password="{your-password}"
index="{your-index}"
source="{your-source}"
sourceType="{your-source-type}"
/>

Don't forget to add your rules

<logger name="*" minlevel="Info" writeTo="f" />

enter image description here

Release Notes

Splunk Target for NLog.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 335 3/2/2018
1.0.0 356 2/28/2017