Posts

Showing posts from June, 2014

WSO2 Governance Registry - Monitor database operations using log4jdbc

LOG4JDBC is a Java based database driver that can be used to log SQL and/or JDBC calls. So here I am going to show how to monitor JDBC operations on Governance Registry using log4jdbc. Here I believe you have already configured Governance Registry instance with MySQL. If not, please follow the instruction available in the Governance Registry documentation . 1). Download the log4jdbc driver  You can download log4jdbc driver from below location: https://code.google.com/p/log4jdbc/ 2). Add log4jdbc driver  Copy log4jdbc driver into CARBON_HOME/repository/components/lib directory. 3). Configure log4j.properties file. Navigate to log4j.properties file located in CARBON_HOME/repository/conf/ directory and add below entry in to log4j.properties file. # Log all JDBC calls except for ResultSet calls log4j.logger.jdbc.audit=INFO,jdbc log4j.additivity.jdbc.audit=false # Log only JDBC calls to ResultSet objects log4j.logger.jdbc.resultset=INFO,jdbc log4j.additivity.jdbc.resultset