RET adapter log files

Log files generated by adapters created with the RET Adapter Toolkit.

Log file locations

Each RET adapter generates the following logs in the directory <dfw_root>/active_blades/<adapter_name>/DataSource/var:

RET adapter log files
Log Name Usage

<AdapterName>-all.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.

The packet-*.log logs are in a binary format. To read them, use the logcat tool found in the servers/Liberator/bin directory.

Log4J configuration

The default log level is INFO.

To change the log level for an adapter, follow the steps below:

  1. Copy the log4j.xml file from active_blades/<Adapter>/Blade/Datasource/etc/log4j.xml into global_config/overrides/<Adapter>/etc

  2. Change the log level in the file global_config/overrides/<Adapter>/etc/log4j.xml

  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>