JDBC Type 4 Driver Programmer's Reference for SQL/MX Release 3.2.1
• “Controlling the QueryExecuteTime Logging Facility” (page 84)
• “QueryExecuteTime logging Message Format” (page 84)
• “Examples of QueryExecuteTime Logging Output” (page 84)
The Type 4 driver Logging facility allows you to retrieve internal tracing information, which you
can use in debugging the driver. It also allows you to capture error and warning messages.
In addition to the standard JDBC tracing and logging facility, the Type 4 driver provides an
independent logging facility (Type 4 Driver Logging).
The Type 4 Driver Logging provides the same level of logging and tracing as the standard JDBC
tracing and logging facility with the following additional information:
• More detail about the internals of the Type 4 driver and internal tracing information.
• Type 4 driver performance-tuning information.
• Finer control over the amount and type of logging information.
• Error and warning messages.
Accessing the Type 4 Driver Logging Facility
The Type 4 Driver Logging facility is based on the java.util.logging package. The Type 4
driver instantiates a java.util.logging.Logger class and names the logger
com.tandem.t4jdbc.logger.
Your JDBC program can access the Type 4 driver logger directly by calling the
java.util.logging.Logger static method getLogger(String).
For example
String t4Logger = java.util.logging.Logger.getLogger(“com.tandem.t4jdbc.logger”);
Controlling Type 4 Driver Logging Output
The Type 4 driver provides two properties that you can use to control logging output.
• T4LogLevel— Specifies the level of logging. For more information, see T4LogLevel Property.
• T4LogFile— Specifies the file to which the driver is to write logging information. For more
information, see T4LogFileProperty.
If the application sets several property values, see “Precedence of Property Specifications” (page
37) to determine which setting applies.
Message Format
The format of the trace output is
sequence-number ~ time-stamp ~ thread-id
~ [connection-id] ~ [server-id] ~ [dialogue-id]
~ [class].[method][(parameters)] ~ [text]
sequence-number
A unique sequence number in increasing order.
time-stamp
The time of the message, for example 10/17/2004 12:48:23
thread-id
The thread identifier within the JVM.
connection-id
If applicable, a unique ID for the connection associated with the message.
82 Tracing and Logging Facilities