org.wso2.carbon.registry.core.statistics.query
Class DBQueryStatisticsLog
java.lang.Object
org.wso2.carbon.registry.core.statistics.query.DBQueryStatisticsLog
public final class DBQueryStatisticsLog
- extends Object
This is an class containing a logger that can be used to log database query statistics related to
the use of one or more registry instances on a given server. Logged statistics registry
operations, accessed tables on the database, and type of query (SELECT, INSERT, DELETE, ...).
In order to see the database query statistics logged on the command line, add the following entry
to the log4j.properties file on the classpath:
log4j.logger.org.wso2.carbon.registry.core.statistics.query=DEBUG
.
This implementation, by default does not store information on duplicate accesses on a particular
table of a database, to optimize performance. If you wish to see the complete list of accesses,
set the carbon.registry.statistics.preserve.duplicate.table.accesses
system property
to true.
This implementation, by default does not log the list of queries executed on the database, to
optimize performance. If you wish to see the complete list of queries executed in chronological
order, set the carbon.registry.statistics.output.queries.executed
system property
to true.
We log statistics for all registry operations by default. If you want to log statistics for a
limited set of operations, you need to specify the names of the operations as a list of comma
separated values using the carbon.registry.statistics.operations
system property.
Method Summary |
static void |
clearStatisticsRecord()
Method to clear the current statistics record. |
static org.apache.commons.logging.Log |
getLog()
Method to obtain an instance of the logger that can be used to log database query statistics. |
static StatisticsRecord |
getStatisticsRecord()
Method to retrieve a Statistics Record. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getLog
public static org.apache.commons.logging.Log getLog()
- Method to obtain an instance of the logger that can be used to log database query statistics.
- Returns:
- the logger that can be used to log database query statistics.
getStatisticsRecord
public static StatisticsRecord getStatisticsRecord()
- Method to retrieve a Statistics Record.
- Returns:
- the current statistics record.
clearStatisticsRecord
public static void clearStatisticsRecord()
- Method to clear the current statistics record.
Copyright © 2012 WSO2 Inc. All Rights Reserved.