r1 - 31 Jul 2008 - 17:12:59 - IrwinTanYou are here: TWiki >  Main Web  >  ElixirRepertoireServer > DedicatedETLCompositeLogger

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");

-- IrwinTan - 31 Jul 2008

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback