|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mysql.jdbc.log.StandardLogger
com.antelmann.sql.MySQLLog
@ThirdParty(value="com.mysql.jdbc") public class MySQLLog
a custom way to trace a MySQL flexibly over this' frameworks logging mechanism.
consumeEvent(ProfilerEvent),
MySQLHelper.configureLogger(Connector, Class),
Connection.getLog(),
MySQLHelper.configureProfiler(Connector, Class),
MySQLHelper.getProfileEventHandler(java.sql.Connection)| Field Summary | |
|---|---|
static Level |
LEVEL_EXECUTE
|
static Level |
LEVEL_FETCH
|
static Level |
LEVEL_OBJECT_CREATION
|
static Level |
LEVEL_PREPARE
|
static Level |
LEVEL_QUERY
|
static Level |
LEVEL_SLOW_QUERY
|
static Level |
LEVEL_WARN
|
static PatternExtractor<LogEntry,com.mysql.jdbc.profiler.ProfilerEvent> |
PROFILER_EXTRACTOR
|
| Constructor Summary | |
|---|---|
MySQLLog()
constructor for the use as ProfilerEventHandler |
|
MySQLLog(String name)
constructor for the use as Log |
|
| Method Summary | |
|---|---|
void |
consumeEvent(com.mysql.jdbc.profiler.ProfilerEvent evt)
|
void |
destroy()
|
protected Level |
determineLevel(com.mysql.jdbc.profiler.ProfilerEvent ev)
|
protected Object[] |
determineParams(com.mysql.jdbc.profiler.ProfilerEvent evt)
|
DataMap<String> |
getDataMap()
by default, this DataMap is not filled by the logged events. |
Logger |
getLogger()
acess to the (non-null) Logger suitable for logging entries in the context of this instance |
void |
init(com.mysql.jdbc.Connection conn,
Properties props)
|
boolean |
isEnableDataMap()
|
protected void |
logInternal(int level,
Object msg,
Throwable exception)
|
protected void |
logInternalStandard(int level,
Object msg,
Throwable exception)
allows access to the super implementation of logInternal(int, Object, Throwable)
in subclasses |
static void |
logStackTraceOnQuery(Connection con,
File logFile,
Filter<com.mysql.jdbc.profiler.ProfilerEvent> filter)
|
void |
setDataLimit(int limit)
|
void |
setEnableDataMap(boolean enableDataMap)
|
| Methods inherited from class com.mysql.jdbc.log.StandardLogger |
|---|
dropBuffer, getBuffer, isDebugEnabled, isErrorEnabled, isFatalEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, logDebug, logDebug, logError, logError, logFatal, logFatal, logInfo, logInfo, logTrace, logTrace, logWarn, logWarn, startLoggingToBuffer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final PatternExtractor<LogEntry,com.mysql.jdbc.profiler.ProfilerEvent> PROFILER_EXTRACTOR
public static final Level LEVEL_WARN
public static final Level LEVEL_OBJECT_CREATION
public static final Level LEVEL_SLOW_QUERY
public static final Level LEVEL_EXECUTE
public static final Level LEVEL_QUERY
public static final Level LEVEL_FETCH
public static final Level LEVEL_PREPARE
| Constructor Detail |
|---|
public MySQLLog()
ProfilerEventHandler
public MySQLLog(String name)
Log
| Method Detail |
|---|
public Logger getLogger()
LoggerProvider
getLogger in interface LoggerProviderpublic boolean isEnableDataMap()
public void setEnableDataMap(boolean enableDataMap)
public void setDataLimit(int limit)
DataPoint.SUM_COMPARATOR,
UniversalComparator.reverse(java.util.Comparator),
DataMap.limitSize(int, java.util.Comparator)public DataMap<String> getDataMap()
setEnableDataMap(boolean)
protected void logInternal(int level,
Object msg,
Throwable exception)
logInternal in class com.mysql.jdbc.log.StandardLogger
protected void logInternalStandard(int level,
Object msg,
Throwable exception)
logInternal(int, Object, Throwable)
in subclasses
public void init(com.mysql.jdbc.Connection conn,
Properties props)
throws SQLException
init in interface com.mysql.jdbc.ExtensionSQLExceptionpublic void destroy()
destroy in interface com.mysql.jdbc.Extensionpublic void consumeEvent(com.mysql.jdbc.profiler.ProfilerEvent evt)
consumeEvent in interface com.mysql.jdbc.profiler.ProfilerEventHandlerprotected Object[] determineParams(com.mysql.jdbc.profiler.ProfilerEvent evt)
protected Level determineLevel(com.mysql.jdbc.profiler.ProfilerEvent ev)
public static void logStackTraceOnQuery(Connection con,
File logFile,
Filter<com.mysql.jdbc.profiler.ProfilerEvent> filter)
throws SQLException,
IOException
SQLException
IOException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||