Skip to main content
Kofax

Scan Agent Service Debug Logging with Timestamps

3028673

Question / Problem: 

How to enable Kofax TotalAgility (KTA) Scan Agent Service Debug logging with Timestamps

Answer / Solution: 

When troubleshooting Scan Agent Service issues where it is beneficial to collect timing information, it is necessary to collect Timestamped KTA Scan Agent Service debug logs.
 

To enable KTA Scan Agent Service Debug logging with Timestamps:

  1. On the scan station, navigate to the following folder:
    C:\Program Files (x86)\Kofax\TotalAgility\Scan Agent
     
  2. Open Kofax.TotalAgility.ScanAgentService.exe.config in a text editor such as Notepad
     
  3. Locate the system.diagnostics section:
    <configuration>
    ...
      <system.diagnostics>
        <trace autoflush="true" />
        <switches>
          <!-- Set the TraceLevelSwitch to any of the following values:
               Off - None
               Error - Only error messages
               Warning - Warning messages and error message
               Information  - Informational messages, warning messages and error messages.
               Verbose - Verbose messages, informational messages, warining messages and error messages.
               All - All messages.
    
               For more information about tracing options, see: http://msdn.microsoft.com/en-us/library/ms228993(v=vs.100).aspx
          -->
          <add name="TraceLevelSwitch" value="Warning" />
    

     
  4. Set the TraceLevelSwitch value to All:
    <configuration>
    ...
      <system.diagnostics>
        <trace autoflush="true" />
        <switches>
          <!-- Set the TraceLevelSwitch to any of the following values:
               Off - None
               Error - Only error messages
               Warning - Warning messages and error message
               Information  - Informational messages, warning messages and error messages.
               Verbose - Verbose messages, informational messages, warining messages and error messages.
               All - All messages.
    
               For more information about tracing options, see: http://msdn.microsoft.com/en-us/library/ms228993(v=vs.100).aspx
          -->
          <add name="TraceLevelSwitch" value="All" />
    

     
  5. Locate the Simple text log section (under system.diagnostics | sharedListeners):
          <!-- Simple text log -->
          <add name="ScanAgentServiceTxt" initializeData="Kofax.TotalAgility.ScanAgentService.TXT.log" type="System.Diagnostics.TextWriterTraceListener">
            <filter type="System.Diagnostics.EventTypeFilter" initializeData="All" />
          </add>
    

     
  6. Comment out the Add ScanAgentServiceTxt section:
          <!-- Simple text log -->
          <!-- <add name="ScanAgentServiceTxt" initializeData="Kofax.TotalAgility.ScanAgentService.TXT.log" type="System.Diagnostics.TextWriterTraceListener">
            <filter type="System.Diagnostics.EventTypeFilter" initializeData="All" />
          </add> -->

     
  7. Locate the Simple text log with date time stamps section:
          <!-- Simple text log with date time stamps
               For initializeData, specify the file where log entries are saved, and optionally, the format for timestamps.
               By default, output is saved to SASLogTxt.log, and the entries use timestamps in the default date format: 
               MM/dd/yyyy hh:mm:ss.fff tt
              
               To change to a different file, type its name. If you also want to specify a different timestamp format, 
               type a semicolon (;) after the file name and use the appropriate date/time format string. For supported formats, 
               see: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
        
               For example, to save logs to my.log and set timestamps to day-month-year format, type the following value for
               initializeData:
        
               initializeData="my.log;dd.MM.yyyy hh:mm:ss.fff tt"
        
               If you only provide the file name, such as initializeData="my.log", the default timestamp format is used. 
          -->
          <!--
          <add name="ScanAgentServiceTxtDateTime" type="Kofax.TotalAgility.ScanAgentService.Common.Diagnostics.DateTimeTaggedTraceListener, Kofax.TotalAgility.ScanAgentService.Common" initializeData="Kofax.TotalAgility.ScanAgentService.TXT.TIMING.log">
            <filter type="System.Diagnostics.EventTypeFilter" initializeData="Off" />
          </add>
          -->

     
  8. Uncomment the Add ScanAgentServiceTxtDateTime section:
          <!-- Simple text log with date time stamps
               For initializeData, specify the file where log entries are saved, and optionally, the format for timestamps.
               By default, output is saved to SASLogTxt.log, and the entries use timestamps in the default date format: 
               MM/dd/yyyy hh:mm:ss.fff tt
              
               To change to a different file, type its name. If you also want to specify a different timestamp format, 
               type a semicolon (;) after the file name and use the appropriate date/time format string. For supported formats, 
               see: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
        
               For example, to save logs to my.log and set timestamps to day-month-year format, type the following value for
               initializeData:
        
               initializeData="my.log;dd.MM.yyyy hh:mm:ss.fff tt"
        
               If you only provide the file name, such as initializeData="my.log", the default timestamp format is used. 
          -->
          <add name="ScanAgentServiceTxtDateTime" type="Kofax.TotalAgility.ScanAgentService.Common.Diagnostics.DateTimeTaggedTraceListener, Kofax.TotalAgility.ScanAgentService.Common" initializeData="Kofax.TotalAgility.ScanAgentService.TXT.TIMING.log">
            <filter type="System.Diagnostics.EventTypeFilter" initializeData="Off" />
          </add>
    

     
  9. Save the changes to Kofax.TotalAgility.ScanAgentService.exe.config
     
  10. Restart the Kofax TotalAgility Scan Agent Service
     
  11. Scan Agent Service log entries are written to:
    C:\Program Files (x86)\Kofax\TotalAgility\Scan Agent\Kofax.TotalAgility.ScanAgentService.TXT.TIMING.log

Kofax.TotalAgility.ScanAgentService.TXT.TIMING.log can grow very large quickly.  Therefore it is not recommended to leave TraceLevelSwitch set to All indefinitely.  Once the issue has been replicated, debug logging should be disabled.


To disable KTA Scan Agent Service Debug logging with Timestamps:

  1. On the scan station, navigate to the following folder:
    C:\Program Files (x86)\Kofax\TotalAgility\Scan Agent
     
  2. Open Kofax.TotalAgility.ScanAgentService.exe.config in a text editor such as Notepad
     
  3. Locate the system.diagnostics section:
    <configuration>
    ...
      <system.diagnostics>
        <trace autoflush="true" />
        <switches>
          <!-- Set the TraceLevelSwitch to any of the following values:
               Off - None
               Error - Only error messages
               Warning - Warning messages and error message
               Information  - Informational messages, warning messages and error messages.
               Verbose - Verbose messages, informational messages, warining messages and error messages.
               All - All messages.
    
               For more information about tracing options, see: http://msdn.microsoft.com/en-us/library/ms228993(v=vs.100).aspx
          -->
          <add name="TraceLevelSwitch" value="All" />
    

     
  4. Set the TraceLevelSwitch value to Warning:
    <configuration>
    ...
      <system.diagnostics>
        <trace autoflush="true" />
        <switches>
          <!-- Set the TraceLevelSwitch to any of the following values:
               Off - None
               Error - Only error messages
               Warning - Warning messages and error message
               Information  - Informational messages, warning messages and error messages.
               Verbose - Verbose messages, informational messages, warining messages and error messages.
               All - All messages.
    
               For more information about tracing options, see: http://msdn.microsoft.com/en-us/library/ms228993(v=vs.100).aspx
          -->
          <add name="TraceLevelSwitch" value="Warning" />
    

     
  5. Save the changes to Kofax.TotalAgility.ScanAgentService.exe.config
     
  6. Restart the Kofax TotalAgility Scan Agent Service

 

Applies to:  

Product Version
KTA 7.5
  7.6
  7.7
  7.8

 

 

  • Was this article helpful?