[Administration-Logging]: 03 Dedicated ETL Composite Logger

This allows a separate log file to be created that only tracks a composite datasources’ processors activities.

Add in the following codes into the \RepertoireServer\config\log-config.xml (For Server Version 7.x)* -

<appender name="MyCompositeLogger" class="org.apache.log4j.RollingFileAppender">
  <param name="File" value="../log/MyCompositeLogger.log"/>
  <param name="Append" value="false"/>
  <param name="Encoding" value="UTF-8"/>
  <param name="MaxBackupIndex" value="5"/>
  <param name="MaxFileSize" value="500KB"/>
  <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern"
                            value="%d{ISO8601},%t,%-5p, %c{2} - %m%n"/>
  </layout>
 </appender>

Note: The above is added to the first instance of the appender method in log-config.xml.

<category name="MyCompositeLogger">
   <priority value="debug" />
   <appender-ref ref="MyCompositeLogger" />
 </category>

Note: The above is added to the first instance of the category method in log-config.xml.

Adding Logging Statement within composite

Under the “Script” Tab of a composite datasource …

importClass(Packages.org.apache.log4j.Logger);
var logger = new Logger.getLogger("MyCompositeLogger");
logger.info("Start");