Hi Kim,
This is my NLog.config
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="
http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
autoReload="true">
<!--
See
http://nlog-project.org/wiki/Configuration_file for information on customizing logging rules and outputs.
-->
<targets async="true">
<!-- each write attempt to be repeated 3 times, sleeping 5 second between attempts if first one fails. -->
<target name="RetryingWrapper" xsi:type="RetryingWrapper" retryCount="3" retryDelayMilliseconds="5000">
<target xsi:type="WebService" protocol="HttpPost" name="webService" url="http://***IPAddress***:8080/api/logs">
<parameter name="appname" type="System.String" layout="My App Name"/>
<parameter name="date" type="System.String" layout="${longdate}"/>
<parameter name="level" type="System.String" layout="${level:upperCase=true}"/>
<parameter name="message" type="System.String" layout="${message}"/>
<parameter name="source" layout="${callsite:includeSourcePath=true}" />
<parameter name="stacktrace" layout="${stacktrace:topFrames=10}" />
<parameter name="exception" layout="${exception:format=ToString}"/>
<parameter name="authKey" layout ="${event-context:item=AuthKey}"/> <---------- This is how I pass the authentication token now
</target>
</target>
</targets>
<rules>
<!-- add your logging rules here -->
<logger name="*" minlevel="Debug" writeTo="webService" final="true" />
</rules>
</nlog>
Regards,
D. Rosado