com.p6spy.engine.common

Class P6LogQuery

public class P6LogQuery extends Object

Description: Some Utility routines ... $Author: cheechq $ $Revision: 1.11 $ $Date: 2003/06/03 19:20:19 $ $Id: P6LogQuery.java,v 1.11 2003/06/03 19:20:19 cheechq Exp $ $Log: P6LogQuery.java,v $ Revision 1.11 2003/06/03 19:20:19 cheechq removed unused imports Revision 1.10 2003/04/09 16:43:59 jeffgoke Added Jboss JMX support. Updated documentation. Added execution threshold property to only log queries taking longer than a specified time. Revision 1.9 2003/03/07 22:09:05 aarvesen added isDebugOn convenience method Revision 1.8 2003/01/10 21:39:43 jeffgoke removed p6util.warn and moved warn handling to logging. this gives a consistent log file. Revision 1.7 2003/01/09 00:51:17 jeffgoke removed trace Revision 1.6 2003/01/03 21:16:00 aarvesen use the new P6Util.forName removed some dead code added a fix for logfile not using the logfile parameter Revision 1.5 2002/12/19 16:58:07 aarvesen Removed some qlog cruft Added in the getTrace check at this level rather than at the driver level for logElapsed Revision 1.4 2002/12/12 19:21:45 aarvesen Try a different class loader and write out the correct class name Revision 1.3 2002/12/06 22:47:06 aarvesen Use the logger rather than good old qlog Revision 1.2 2002/10/06 18:21:37 jeffgoke no message Revision 1.1 2002/05/24 07:32:01 jeffgoke version 1 rewrite Revision 1.11 2002/05/18 06:39:52 jeffgoke Peter Laird added Outage detection. Added junit tests for outage detection. Fixed multi-driver tests. Revision 1.10 2002/05/16 04:58:40 jeffgoke Viktor Szathmary added multi-driver support. Rewrote P6SpyOptions to be easier to manage. Fixed several bugs. Revision 1.9 2002/05/05 00:43:00 jeffgoke Added Philip's reload code. Revision 1.8 2002/04/25 06:51:28 jeffgoke Philip Ogren of BEA contributed installation instructions for BEA WebLogic Portal and Server Jakarta RegEx support (contributed by Philip Ogren) Ability to print stack trace of logged statements. This is very useful to understand where a logged query is being executed in the application (contributed by Philip Ogren) Simplified table monitoring property file option (contributed by Philip Ogren) Updated the RegEx documentation Revision 1.7 2002/04/22 02:57:45 jeffgoke fixed bug in log Revision 1.6 2002/04/22 02:26:06 jeffgoke Simon Sadedin added timing information. Added Junit tests. Revision 1.5 2002/04/21 06:15:34 jeffgoke added test cases, fixed batch bugs Revision 1.4 2002/04/15 05:13:32 jeffgoke Simon Sadedin added timing support. Fixed bug where batch execute was not getting logged. Added result set timing. Updated the log format to include categories, and updated options to control the categories. Updated documentation. Revision 1.3 2002/04/10 06:49:26 jeffgoke added more debug information and a new property for setting the log's date format Revision 1.2 2002/04/07 20:43:59 jeffgoke fixed bug that caused null connection to return an empty connection instead of null. added an option allowing the user to truncate. added a release target to the build to create the release files. Revision 1.1.1.1 2002/04/07 04:52:25 jeffgoke no message Revision 1.3 2001-08-05 09:16:03-05 andy version on the website Revision 1.2 2001-07-30 23:38:14-05 andy trim the table names in include/exclude Revision 1.1 2001-07-30 23:03:31-05 andy <> Revision 1.0 2001-07-30 17:46:23-05 andy Initial revision
Field Summary
protected static String[]excludeCategories
protected static String[]excludeTables
protected static String[]includeCategories
protected static String[]includeTables
protected static StringlastStack
protected static P6Loggerlogger
protected static PrintStreamqlog
Method Summary
static voidclearLastStack()
protected static voiddoLog(long elapsed, String category, String prepared, String sql)
protected static voiddoLog(int connectionId, long elapsed, String category, String prepared, String sql)
protected static voiddoLogElapsed(int connectionId, long startTime, long endTime, String category, String prepared, String sql)
static String[]getExcludeTables()
static String[]getIncludeTables()
static StringgetLastEntry()
static StringgetLastStack()
static voidinitMethod()
static booleanisDebugOn()
static voidlog(String category, String prepared, String sql)
static voidlogDebug(String sql)
static voidlogElapsed(int connectionId, long startTime, String category, String prepared, String sql)
static voidlogElapsed(int connectionId, long startTime, long endTime, String category, String prepared, String sql)
static voidlogError(String sql)
static voidlogInfo(String sql)
static PrintStreamlogPrintStream(String file)
static voidlogText(String text)
static voidsetExcludeCategories(String _excludeCategories)
static voidsetExcludeTables(String _excludeTables)
static voidsetIncludeCategories(String _includeCategories)
static voidsetIncludeTables(String _includeTables)

Field Detail

excludeCategories

protected static String[] excludeCategories

excludeTables

protected static String[] excludeTables

includeCategories

protected static String[] includeCategories

includeTables

protected static String[] includeTables

lastStack

protected static String lastStack

logger

protected static P6Logger logger

qlog

protected static PrintStream qlog

Method Detail

clearLastStack

public static void clearLastStack()

doLog

protected static void doLog(long elapsed, String category, String prepared, String sql)

doLog

protected static void doLog(int connectionId, long elapsed, String category, String prepared, String sql)

doLogElapsed

protected static void doLogElapsed(int connectionId, long startTime, long endTime, String category, String prepared, String sql)

getExcludeTables

public static String[] getExcludeTables()

getIncludeTables

public static String[] getIncludeTables()

getLastEntry

public static String getLastEntry()

getLastStack

public static String getLastStack()

initMethod

public static void initMethod()

isDebugOn

public static boolean isDebugOn()

log

public static void log(String category, String prepared, String sql)

logDebug

public static void logDebug(String sql)

logElapsed

public static void logElapsed(int connectionId, long startTime, String category, String prepared, String sql)

logElapsed

public static void logElapsed(int connectionId, long startTime, long endTime, String category, String prepared, String sql)

logError

public static void logError(String sql)

logInfo

public static void logInfo(String sql)

logPrintStream

public static PrintStream logPrintStream(String file)

logText

public static void logText(String text)

setExcludeCategories

public static void setExcludeCategories(String _excludeCategories)

setExcludeTables

public static void setExcludeTables(String _excludeTables)

setIncludeCategories

public static void setIncludeCategories(String _includeCategories)

setIncludeTables

public static void setIncludeTables(String _includeTables)