Logging

If there are issues with a SenseAdapt installation, we may ask you to enable logging so we can investigate the issue further.

To enable logging in SenseAdapt find the file called NLog.log (from version 2.0.0.485 of SenseAdapt)

  • In this file find the tag globalThreshold="off" and remove it.
  • Ensure that the SenseAdapt.log file path is correct on your system
  • Change the following line
     <logger name="*" minlevel="Off" writeTo="logfile" />
    to
     <logger name="*" minlevel="Trace" writeTo="logfile" />

SenseAdapt should now start logging.


Below is the version of the logging configuration file that ships with SenseAdapt.

<?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"
      xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
      autoReload="true"
      throwExceptions="true"
      globalThreshold="Off"
      internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log" >

<!--

   
   
STEP 1
Before you enable logging below set a path to where you would like your log file created below
-->
  <targets>
    <target name="logfile" xsi:type="File" 
            layout="${longdate} | ${logger} | ${level} | ${message} ${exception:format=tostring}"
            fileName="c:\temp\SenseAdapt.log"/>
  </targets>

  <rules>
 
    <!--   
 STEP 2
    
    Enable logging below by setting the minlevel to Trace
    
    Recommend: To turn on logging set the minlevel to Trace. Set it to Off to turn off logging
    -->

    <logger name="*" minlevel="Off" writeTo="logfile" />
  </rules>
</nlog>