Troubleshoot my RET Adapter

If you have trouble running an adapter, you can use the Liberator status page (http://<liberator-host>:<http-port>/status) to determine whether the adapter is up or down.

Log files

Logs help to troubleshoot an Adapter blade. More information can be found in 'Troubleshoot an Adapter blade'.

Log file locations
Component Log file location
Liberator <dfw_root>/servers/Liberator/var
Transformer <dfw_root>/servers/Transformer/var
RET Adapters <dfw_root>/active_blades/<adapter_name>/DataSource/var
RET adapter log files
Log Name Usage
<AdapterName>-adapter.log  Contains all customised code, event and trapi logs.
datasource.log Contains logs for the underlying Caplin DataSource.
event-<AdapterName>.log Contains logs for the Adapter only.
trapi-<AdapterName>.log Contains logs for the retIntegrationAPI layer that integrates with RET only.
packet-<AdapterName>.log

Contains packet data logs for the underlying DataSource.

java-<AdapterName>.log Contains java related logs.
jmx-<AdapterName>.log Contains adapters JMX logs.
blotter-<AdapterName>.log Contains adapters blotter API specific logs.
ret.log

RET API specific log. Disabled by default (enable by setting ret_log_enabled=true in the file trapi-connection.properties). This file is required by RET support to investigate issues with RET-AD.

AdminAPI.log RET Admin API specific log. 
Note: To view the packet-*.log logs, first they will need to be processed by the logcat tool found in servers/Liberator/bin/logcat

Configure logs with log4j

The log level default is set to INFO for all adapters in the RET Adapter Suite. One exception is the PricingAdapter, which is set to DEBUG level, as the logs would grow to fast for price updates.

If you want to change the log configuration of your Adapters follow these steps: 

  1. Copy the log4j.xml file from activate_blades/<Adapter>/Blade/Datasource/etc/log4j.xml into global_config/overrides/<Adapter>/etc
  2. Change the log level of the log4j.xml in global_config/overrides/<Adapter>/etc
  3. Restart the adapter ./dfw start <Adapter>

​Example log4j.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
  <Appenders>
     <!-- This logs all log messages -->
    <RollingFile name="all" fileName="var/all-<Adapters>.log" filePattern="var/all-<Adapters>-%i.log.gz">
      <PatternLayout pattern="%d{yyyy MMM dd HH:mm:ss.SSS Z}  -  [%t] %-5p %c - %m%n"/>
       <Policies><SizeBasedTriggeringPolicy size="50 MB"/></Policies>
      <DefaultRolloverStrategy max="50"/>
    </RollingFile>
    
    <!-- This logs only trapi-layer logs -->
    <RollingFile name="trapi" fileName="var/trapi-<Adapters>.log" filePattern="var/trapi-<Adapters>-%i.log.gz">
      <PatternLayout pattern="%d{yyyy MMM dd HH:mm:ss.SSS Z}  -  [%t] %-5p %c - %m%n"/>
       <Policies><SizeBasedTriggeringPolicy size="50 MB"/></Policies>
      <DefaultRolloverStrategy max="50"/>
    </RollingFile>
    
    <!-- This logs only adapter logs -->
    <RollingFile name="event" fileName="var/event-<Adapters>.log" filePattern="var/event-<Adapters>.log-%i.log.gz">
      <PatternLayout pattern="%d{yyyy MMM dd HH:mm:ss.SSS Z}  -  [%t] %-5p %c - %m%n"/>
       <Policies><SizeBasedTriggeringPolicy size="50 MB"/></Policies>
      <DefaultRolloverStrategy max="50"/>
    </RollingFile>
   <!--This logs only jmx logs -->
   <RollingFile name="jmx" fileName="var/jmx-<Adapters>.log" filePattern="var/jmx-<Adapters>-%i.log.gz">
    <PatternLayout pattern="%d{yyyy MMM dd HH:mm:ss.SSS Z}  -  [%t] %-5p %c - %m%n"/>
      <Policies><SizeBasedTriggeringPolicy size="500 MB"/></Policies>
  <DefaultRolloverStrategy max="50"/>
</RollingFile>
  </Appenders>

  <Loggers>
    <Root level="info">
      <AppenderRef ref="all"/>
    </Root>
    <Logger name="com.caplin.motif" level="info">
      <AppenderRef ref="event"/>
    </Logger>
    <Logger name="com.caplin.ret.trapi" level="info">
      <AppenderRef ref="trapi"/>
    </Logger>    
    <Logger name="com.caplin.ret.trapi.connection.pool" level="info" additivity="false">
      <AppenderRef ref="jmx"/>
    </Logger> 
  </Loggers>
</Configuration>