org.apache.ojb.p6spy
Class CountLogger

java.lang.Object
  extended bycom.p6spy.engine.logging.appender.FormattedLogger
      extended bycom.p6spy.engine.logging.appender.StdoutLogger
          extended bycom.p6spy.engine.logging.appender.FileLogger
              extended byorg.apache.ojb.p6spy.CountLogger
All Implemented Interfaces:
com.p6spy.engine.logging.appender.P6Logger

public class CountLogger
extends com.p6spy.engine.logging.appender.FileLogger
implements com.p6spy.engine.logging.appender.P6Logger

Use this class in order to log and count jdbc statements

Version:
$Id: CountLogger.java,v 1.4 2003/12/23 09:55:03 brj Exp $
Author:
Oliver Matz

Field Summary
protected  java.lang.String lastEntry
           
 
Fields inherited from class com.p6spy.engine.logging.appender.StdoutLogger
qlog
 
Constructor Summary
CountLogger()
           
 
Method Summary
static int getSQLStatementCount()
           
 void logSQL(int i, java.lang.String s, long l, java.lang.String s1, java.lang.String s2, java.lang.String s3)
          count the statements in case counting is enabled.
 
Methods inherited from class com.p6spy.engine.logging.appender.FileLogger
setLogfile
 
Methods inherited from class com.p6spy.engine.logging.appender.StdoutLogger
logException, logText
 
Methods inherited from class com.p6spy.engine.logging.appender.FormattedLogger
getLastEntry, setLastEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.p6spy.engine.logging.appender.P6Logger
getLastEntry, logException, logText
 

Field Detail

lastEntry

protected java.lang.String lastEntry
Constructor Detail

CountLogger

public CountLogger()
Method Detail

logSQL

public void logSQL(int i,
                   java.lang.String s,
                   long l,
                   java.lang.String s1,
                   java.lang.String s2,
                   java.lang.String s3)
count the statements in case counting is enabled.

Specified by:
logSQL in interface com.p6spy.engine.logging.appender.P6Logger
See Also:
FormattedLogger.logSQL(int, java.lang.String, long, java.lang.String, java.lang.String, java.lang.String)

getSQLStatementCount

public static int getSQLStatementCount()
Returns:
the number of statements issued so far.


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14