JDBC Type 4 Driver Programmer's Reference for SQL/MX Release 3.2.1

9 Tracing and Logging Facilities
The Type 4 driver provides two tracing and logging facilities:
“Standard JDBC Tracing and Logging Facility” (page 81)
“The Type 4 Driver Logging Facility” (page 81)
Accessing the Type 4 Driver Logging Facility” (page 82)
“Controlling Type 4 Driver Logging Output (page 82)
“Message Format (page 82)
“Examples of Logging Output (page 83)
“Controlling the QueryExecuteTime Logging Facility” (page 84)
“QueryExecuteTime logging Message Format” (page 84)
“Examples of QueryExecuteTime Logging Output (page 84)
MXCS (server-side) tracing (logging) is enabled by configuring MXCS. For information about MXCS
tracing, see the NSM/Web online help.
Standard JDBC Tracing and Logging Facility
The JDBC standard provides a logging and tracing facility, which allows tracing JDBC method
calls by setting the log writer. To set the log writer, either call the setLogWriter() method on the
DriverManager class or call the setLogWriter() method on the DataSource class (or
ConnectionPoolDataSource class).
A DriverManager log writer is a character output stream to which all logging and tracing
messages for all connections made through the DriverManager are printed. This stream
includes messages printed by the methods of this connection, messages printed by methods
of other objects manufactured by the connection, and so on. The DriverManager log writer
is initially null, that is, the default is for logging to be disabled.
For information about using the setLogWriter method, see the DriverManager class API
(http://download.oracle.com/javase/1.5.0/docs/api/java/sql/DriverManager.html).
A DataSource log writer is a character output stream to which all logging and tracing
messages for this data source are printed. This stream includes messages printed by the
methods of this object, messages printed by methods of other objects manufactured by this
object, and soon. Messages printed to a data-source-specific log writer are not printed to the
log writer associated with the java.sql.DriverManager class. When a DataSource
object is created, the log writer is initially null; that is, the default is for logging to be disabled.
For information about using the setLogWriter() method, see the DataSource interface API:
http://download.oracle.com/javase/1.5.0/docs/api/javax/sql/DataSource.html
The Type 4 Driver Logging Facility
Accessing the Type 4 Driver Logging Facility” (page 82)
“Controlling Type 4 Driver Logging Output (page 82)
“Controlling Type 4 Driver Logging Output (page 82)
“Message Format” (page 82)
“Examples of Logging Output (page 83)
Standard JDBC Tracing and Logging Facility 81