r1 - 02 Aug 2007 - 02:57:21 - ZacSim?You are here: TWiki >  Main Web  >  ElixirRepertoireServer > TraceOnSQLStatementForJDBC

Trace on SQL Statement for JDBC

This allows logging on the SQL statement that is being parsed through the Repertoire Server using JDBC connection.

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

<!-- Additional category entry to track all JDBC calls to database -->
   <appender name="JDBC" class="org.apache.log4j.RollingFileAppender"> 
       <param name="File" value="../log/JDBC.log"/> 
       <param name="Append" value="false"/> 
       <param name="MaxBackupIndex" value="5"/> 
       <param name="MaxFileSize" value="1000KB"/> 
       <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d,%-5p, %c{2} - %m%n"/>
       </layout>
   </appender> 

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

<!-- Additional category entry to track all JDBC calls to database --> 
<category name="com.elixirtech.data2.datasource.jdbc.JDBCProcessor">
     <priority value="debug" />
      <appender-ref ref="JDBC" />
   </category>

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

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

<!-- Additional category entry to track all JDBC calls to database -->
   <appender name="JDBC" class="com.elixirtech.ers2.log.RollingFileTimeStampAppender">
       <param name="File" value="../log/JDBC.log"/>
       <param name="FileDatePattern" value="yyyy-MM-dd"/>
       <param name="Append" value="false"/>
       <param name="MaxBackupIndex" value="5"/>
       <param name="MaxFileSize" value="1000KB"/>
       <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d,%-5p, %c{2} - %m%n"/>
       </layout>
   </appender>

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

<!-- Additional category entry to track all JDBC calls to database -->
   <category name="ER.Data2.JDBC.JDBCProcessor">
     <priority value="debug" />
      <appender-ref ref="JDBC" />
   </category>

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

-- ZacSim? - 02 Aug 2007

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