Package org.h2.message
Class Trace
java.lang.Object
org.h2.message.Trace
This class represents a trace module.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe trace module id for commands.static final intThe trace module id for constraints.static final intThe trace module id for databases.static final intThe trace module id for file locks.static final intThe trace module id for functions.static final intThe trace module id for indexes.static final intThe trace module id for the JDBC API.static final intThe trace module id for the JDBCX APIstatic final intThe trace module id for locks.static final intThe trace module id for schemas.static final intThe trace module id for sequences.static final intThe trace module id for settings.static final intThe trace module id for tables.static final intThe trace module id for triggers.static final intThe trace module id for users. -
Method Summary
Modifier and TypeMethodDescriptionvoidWrite a message with trace level DEBUG to the trace system.voidWrite a message with trace level DEBUG to the trace system.voidWrite a message with trace level DEBUG to the trace system.voidWrite a message with trace level ERROR to the trace system.voidWrite a message with trace level ERROR to the trace system.static StringformatParams(ArrayList<? extends ParameterInterface> parameters) Format the parameter list.voidWrite a message with trace level INFO to the trace system.voidWrite a message with trace level INFO to the trace system.voidWrite Java source code with trace level INFO to the trace system.voidWrite a SQL statement with trace level INFO to the trace system.booleanCheck if the trace level is equal or higher than DEBUG.booleanCheck if the trace level is equal or higher than INFO.voidsetLevel(int level) Set the trace level of this component.
-
Field Details
-
COMMAND
public static final int COMMANDThe trace module id for commands.- See Also:
-
CONSTRAINT
public static final int CONSTRAINTThe trace module id for constraints.- See Also:
-
DATABASE
public static final int DATABASEThe trace module id for databases.- See Also:
-
FUNCTION
public static final int FUNCTIONThe trace module id for functions.- See Also:
-
FILE_LOCK
public static final int FILE_LOCKThe trace module id for file locks.- See Also:
-
INDEX
public static final int INDEXThe trace module id for indexes.- See Also:
-
JDBC
public static final int JDBCThe trace module id for the JDBC API.- See Also:
-
LOCK
public static final int LOCKThe trace module id for locks.- See Also:
-
SCHEMA
public static final int SCHEMAThe trace module id for schemas.- See Also:
-
SEQUENCE
public static final int SEQUENCEThe trace module id for sequences.- See Also:
-
SETTING
public static final int SETTINGThe trace module id for settings.- See Also:
-
TABLE
public static final int TABLEThe trace module id for tables.- See Also:
-
TRIGGER
public static final int TRIGGERThe trace module id for triggers.- See Also:
-
USER
public static final int USERThe trace module id for users.- See Also:
-
JDBCX
public static final int JDBCXThe trace module id for the JDBCX API- See Also:
-
-
Method Details
-
setLevel
public void setLevel(int level) Set the trace level of this component. This setting overrides the parent trace level.- Parameters:
level- the new level
-
isInfoEnabled
public boolean isInfoEnabled()Check if the trace level is equal or higher than INFO.- Returns:
- true if it is
-
isDebugEnabled
public boolean isDebugEnabled()Check if the trace level is equal or higher than DEBUG.- Returns:
- true if it is
-
error
Write a message with trace level ERROR to the trace system.- Parameters:
t- the exceptions- the message
-
error
Write a message with trace level ERROR to the trace system.- Parameters:
t- the exceptions- the messageparams- the parameters
-
info
Write a message with trace level INFO to the trace system.- Parameters:
s- the message
-
info
Write a message with trace level INFO to the trace system.- Parameters:
s- the messageparams- the parameters
-
formatParams
Format the parameter list.- Parameters:
parameters- the parameter list- Returns:
- the formatted text
-
infoSQL
Write a SQL statement with trace level INFO to the trace system.- Parameters:
sql- the SQL statementparams- the parameters used, in the for {1:...}count- the update counttime- the time it took to run the statement in ms
-
debug
Write a message with trace level DEBUG to the trace system.- Parameters:
s- the messageparams- the parameters
-
debug
Write a message with trace level DEBUG to the trace system.- Parameters:
s- the message
-
debug
Write a message with trace level DEBUG to the trace system.- Parameters:
t- the exceptions- the message
-
infoCode
Write Java source code with trace level INFO to the trace system.- Parameters:
java- the source code
-