Managing Event Replicator Target Adapter Log Files and Console Messages

#### Search Results

Search

# Managing Event Replicator Target Adapter Log Files and Console Messages

This document covers the following topics:

- Log File Location

- Reviewing the sqlrep.log File

- sqlrep.log File Retention

- Setting Log Levels

## Log File Location

All Event Replicator Target Adapter log files are stored in the \logs subdirectory of your Event Replicator Target Adapter installation. The Event Replicator Target Adapter log file name is sqlrep.log, which contains all current log messages. If you have a problem, please keep this log file.

In addition, the following additional log files may be found at this location. If you have a problem, please keep these log files as well:

- Statistics about the Event Replicator Target Adapter session are stored in log files with names in the format: `ArtResource_yyyymmdd_hhmmss.log`, where the date and time are used to make unique log files for each session.

- Metrics up to the last transaction processed during the session are stored in log files with names in the format: `ArtMetrics_yyyymmdd_hhmmss.log`, where the date and time are used to make unique log files for each session.

- If you requested that IBM EntireX or WebSphere MQ tracing occur when you configured the source definitions for Event Replicator Target Adapter, the etb_trace.log file (for IBM EntireX) or the mqs_trace.log file (for WebSphere MQ) will be created at this location.

- If you requested that all incoming Event Replicator messages be captured for debugging purposes when you configured the source definitions for Event Replicator Target Adapter, an etb_capture.log file (for IBM EntireX) or an mqs_capture.log file (for WebSphere MQ) will be created at this location.

## Reviewing the sqlrep.log File

On Windows systems, the sqlrep.log file can be reviewed using a text editor. On UNIX systems, it can be reviewed by running the sqlreplog.sh script. You can control the level of log messages written to the sqlrep.log file; read Setting Log Levels for more information.

## sqlrep.log File Retention

Each time you start up the Event Replicator Target Adapter, a new sqlrep.log file is created. The previously-existing log file will be renamed sqlrep.log.1. All previous log files are also retained and renamed, so that the lowest numbered file is the most recent historical log file (the sqlrep.log file with no number is always the current log file). In other words, if an sqlrep.log and an sqlrep.log.1 file already exist when the Event Replicator Target Adapter is started, the following sequence of events occurs:

1. File sqlrep.log.1 is renamed to sqlrep.log.2.

2. File sqlrep.log is renamed to sqlrep.log.1.

3. A new sqlrep.log file is created for the new Event Replicator Target Adapter session.

When an sqlrep.log file reaches 10MB in size, it is renamed sqlrep.log.1, and all previous log files are retained and renamed as well, as described above.

A maximum of 99,999 log files can be retained. When this maximum is reached and a new sqlrep.log file is created, the sqlrep.log.99999 file is overwritten with data from the sqlrep.log.99998 log file.

## Setting Log Levels

You can set the log level of messages written to the sqlrep.log log file, the Windows and UNIX event logs, and to the console. Three log levels are available (listed in order of settings that result in the most logging to those resulting in the least logging):

Log Level | Description
--- | ---
debug | Only debugging, informational, warning, error, and fatal messages are logged or displayed. Note Setting this log level can impact performance.
info | Only informational, warning, error, and fatal messages are logged or displayed.
error | Only error and fatal messages are logged or displayed.

To change the log level of messages sent to the console:

1. Edit the log4j2.xml file. This file is located in the \webapps\sqlrep\WEB-INF\classes directory wherever you installed Event Replicator Target Adapter.

2. To produce a debug log, edit the following line as indicated:

         <Loggers>
           <Logger name="com.softwareag.adabas.jas" level="error" additivity="false">
             <AppenderRef ref="File"/>
           </Logger>
           <Logger name="com.softwareag.adabas.xts" level="error" additivity="false">
             <AppenderRef ref="File"/>
           </Logger>
           <Logger name="com.softwareag.ada.reptor" level="debug" additivity="false">

   Tip
   Change “info” to “debug” on the last line to activate debug trace.

       <AppenderRef ref="File"/>
             <AppenderRef ref="Console" level="info"/>

   Tip
   Leave this at “info” to avoid debug information in the console. Set this to “debug” only if you want debug trace in the console.

       </Logger>
           <Root level="info">
             <AppenderRef ref="Console"/>
           </Root>
         </Loggers>

   Note
   Setting the log level to DEBUG can impact performance.

### On this page

- Log File Location
- Reviewing the sqlrep.log File
- sqlrep.log File Retention
- Setting Log Levels