1


I am using NLog in my one of the application and I am able to log the information in different targets like File,Console,EventLog and also to NLogViewer.
I am using the layout as

<?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" >
<targets>
  <target name="event" xsi:type="EventLog" layout="${longdate}|${level}|${message}|${event-properties:EventID}" source="NLogDemo" />
  <target name="file" xsi:type="File" fileName="C:\Users\sharathk\Desktop\ToCompare\${shortdate}LoggingDemo.txt" 
          layout="---------NLog File--------${newline}${longdate}=>${level}=>${message}=>${event-properties:EventID}=>${callsite:fileName=true:methodName=true}" />
  <target name="console"  xsi:type="Console" layout="${longdate}|${level}|${message}|${callsite:fileName=true}" />
  <target name="viewer" xsi:type="NLogViewer" layout="${longdate}|${level}|${message}|${callsite:fileName=true}" address="udp://10.100.18.166:9999"/>
</targets>
<rules>
  <logger name="*" minlevel="Trace" writeTo="file,console,viewer" />
</rules>

callSite property showing the right information in File, Console and EventLog but its not showing any information using callSite in Sentinel
Please anybody help to resolve this.

shary.sharath
  • 649
  • 2
  • 14
  • 29

1 Answers1

0

Include something like this in your network target:

includeCallSite="true" includeSourceInfo="true"