Log files Pad Connector version 2.1.5 b274

This shows how to create log files for Pad Connector version 2.1.5 b274


java.util.logging (equivalent to the wrapper.log)


Can be configured with a properties file.

Assuming the following log properties file

C:\temp\PadConnectorLog.properties


PadConnectorLog.properties

handlers = java.util.logging.FileHandler java.util.logging.ConsoleHandler
 
java.util.logging.FileHandler.level     = DEBUG
java.util.logging.FileHandler.filter    =
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.encoding  =
java.util.logging.FileHandler.limit     =
java.util.logging.FileHandler.count     =
java.util.logging.FileHandler.append    = true
java.util.logging.FileHandler.pattern   = C:\\temp\\PadConnectorLog.txt
 
java.util.logging.ConsoleHandler.level     = DEBUG
java.util.logging.ConsoleHandler.filter    =
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.encoding  =

The JVM can be told to use it with "-Djava.util.logging.config.file=C:\\temp\\PadConnectorLog.properties"

If the PadConnector is running with a launcher named stepover-padconnector-console.exe, this option needs to be put into the accompanying vmoptions file stepover-padconnector-console.vmoptions next to it.


How to do:


  • First you need to add   -Djava.util.logging.config.file=C:\\temp\\PadConnectorLog.properties   into stepover-padconnector-console.vmoptions.
  • Then you have to create PadConnectorLog.properties, filled with above information and PadConnectorLog.txt in C:\\temp (for example). You can choose a directory of your choice (needs to be defined in stepover-padconnector-console.vmoptions).
  • Then you have to restart the Pad Connector.


The resulting log may be equivalent to the wrapper.log written by yajsw used in certain PadConnector setups.



DeviceAPI logs


Can be captured by putting  an NLog.dll.nlog configuration file next to the NLog.dll.

For example
NLog.dll.nlog

<?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"
      throwConfigExceptions="true">
 
  <!-- see https://github.com/NLog/NLog/wiki/Configuration-file -->
  <targets>
    <target name="logfile" xsi:type="File"
             
            fileName="C:\\temp\\DeviceApiLog.txt"
            layout="${longdate}|${level:uppercase=true}|${environment-user}|${threadid}|${callsite}|${message}|${exception:format=tostring}"
            header="user = ${environment:USERNAME}, arch = ${environment:PROCESSOR_ARCHITECTURE}"
            footer="_______________ "/>
  </targets>
 
  <rules>
    <logger name="*" minlevel="Debug" writeTo="logfile" />
  </rules>
</nlog>

The NLog.dll is in the NativeDeviceAPI directory in the installation location.


How to do:


  • Stop the Pad Connector.
  • You need to create NLog.dll.nlog, filled with above information, and put it into NativeDeviceAPI in the Installation location. 
  • Start the Pad Connector.