JDBC Type 4 Driver Programmer's Reference for SQL/MX Release 3.1 (H06.23+, J06.12+)
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 information about using this property, see T4LogLevel Property.
T4LogFile—specifies the file to which the driver is to write logging information. For information about using this property, see T4LogFile
Property.
If the application sets several property values, see
Precedence of Property Specifications 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.
server-id
If applicable, information about the MXCS server associated with the message. The server-id is of the form:
TCP:node-name.server-name/port-number:NonStopODBC
where
node-name
is the name of the NonStop server node.
server-name
is the Guardian name of the server.
port-number
is the port to which the server is connected.
For example:
TCP:\banshee-tcp.$Z0133/46003:NonStopODBC
dialogue-id
If applicable, the dialogue-id used for the MXCS connection.
class
If applicable, the name of the class that issued the logging request.
method
If applicable, the name of the method that issued the logging request.
parameters
An optional set of parameters associated with the method.
text
Optional textual information for the message.
Note: The tilde (~) character separates message parts. This separator allows you to format the message using tools, such
as Excel, Word, UNIX sort, and so forth. For example, you can format and sort messages based on sequence
number or thread ID. You can edit the log file and change the separator (the tilde) to any character you want. When
possible, numbers (such as
thread-id and sequence-number) are pre-pended with zeros (0) to allow for readable
formatting.
Examples of Logging Output










