Table of Contents

Search

  1. Preface
  2. PowerExchange CDC Publisher Overview
  3. Installing and Upgrading PowerExchange CDC Publisher
  4. PowerExchange CDC Publisher Key Concepts
  5. PowerExchange Change Capture Environment
  6. Target Messaging Systems
  7. Configuring PowerExchange CDC Publisher
  8. Streaming Change Data
  9. Monitoring PowerExchange CDC Publisher
  10. Administering PowerExchange CDC Publisher
  11. Command Reference for the Command-Line Utilities
  12. Avro Schema Formats
  13. Message Reference

User Guide

User Guide

Configuring CDC Publisher Message Logging

Configuring CDC Publisher Message Logging

The PowerExchange CDC Publisher uses the Apache Log4j 2 API to implement message logging and tracing.
The PWX CDC Publisher provides a sample Log4j logging configuration file in XML format, PwxCDCPubLog4j.xml, in the
\
pwxcdcpub_root_installation
\samples
subdirectory. The sample file contains the Log4j 2 configuration properties that the PowerExchange CDC Publisher uses.
For information about Log4j 2 logging configuration properties, see the Apache Log4j 2 documentation.
You must copy the sample PwxCDCPubLog4j.xml file from the samples subdirectory to the
\
pwxcdcpub_root_installation
\instanceA\config
subdirectory. If you use multiple instances, copy the file to the config subdirectory for each instance. Do not rename the file. Usually, the PwxCDCPubLog4j.xml file in the config subdirectory can be used without modification, even for instances other than instanceA. However, if you want trace messages to be logged, you must change the following Logger statement to specify level="all":
<Logger name="trace"
level="all"
additivity="false" includeLocation="false"> <AppenderRef ref="TraceFile"/> </Logger>
Based on the PwxCDCPubLog4j.xml file configuration, as delivered, Log4j 2 logs CDC Publisher messages to files in the
\
pwxcdcpub_root_installation
\instanceA\logs
subdirectory. If you use instances other than instanceA, the PwxCDCPubLog4j.xml file is automatically updated with the current instance name when you start the PwxCDCPublisher process so that messages will be logged to the logs subdirectory of that instance.
Also, based on the delivered PwxCDCPublLog.xml file, Log4j 2 generates log files for PowerExchange CDC Publisher messages in the
\
pwxcdcpub_root_installation
\
instance
\logs
subdirectory using the following naming conventions:
  • The active log file is named PwxCdcPublisher.out.
  • Archive log files are generated using the following file-name format:
    PwxCdcPublisher.out.
    yyyy
    -
    mm
    -
    dd
    -
    hh
    -
    n
    .gz
    , where
    yyyy
    -
    mm
    -
    dd
    is year-month-day,
    hh
    is hour of the day, and
    n
    is a generated number. In the a sample Log4j logging configuration file, the maximum number of archive log files is set to 999999.
The active log is archived when the maximum file size is reached or when the CDC Publisher is restarted. The Log4j default maximum size is 10 MB. You can change this maximum size in the PwxCDCPubLog4j.xml file. Each time you restart the CDC Publisher, the previous log file is archived and a new active log file is created.
For your convenience, any error and warning messages that PowerExchange returns to the CDC Publisher are also written to the PwxCdcPublisher.out file in the logs subdirectory by default. Optionally, you can configure the CDC Publisher to also log PowerExchange informational messages to the PwxCdcPublisher.out file by specifying Extract.pwxReturnLogInfoMessages=true in the cdcPublisherPowerExchange.cfg configuration file.

0 COMMENTS

We’d like to hear from you!