Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Content Zone
locationtop

log4j configs

Follow the steps below to set up the correlation logs related to the database calls.

  1. Open the log4j.properties file in the <IS_HOME>/repository/conf directory.
  2. Add the following code to it.

    Code Block
    # Appender config to put correlation Log.
    log4j.logger.correlation=INFO, CORRELATION
    log4j.additivity.correlation=false
    log4j.appender.CORRELATION=org.apache.log4j.RollingFileAppender
    log4j.appender.CORRELATION.File=${carbon.home}/repository/logs/${instance.log}/correlation.log
    log4j.appender.CORRELATION.MaxFileSize=10MB50MB
    log4j.appender.CORRELATION.MaxBackupIndex=100
    log4j.appender.CORRELATION.layout=org.apache.log4j.PatternLayout
    log4j.appender.CORRELATION.Threshold=INFO
    log4j.appender.CORRELATION.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS}|%X{Correlation-ID}|%t|%m%n

Tomcat valve configs

Follow the steps below to set up the correlation ID mapping between the request database call and the response database call.

  1. Open the catalina-server.xml file in the <IS_HOME>/repository/conf/tomcat directory.
  2. Add the following value under the <Host> tag.

    Code Block
    <Valve className="org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve"
                           headerToCorrelationIdMapping="{'activityid':'Correlation-ID'}" queryToCorrelationIdMapping="{'RelayState':'Correlation-ID'}"/>
    Note

    This should be the first valve under the <Host> tag.

...