Neoview JDBC Type 4 Driver Programmer's Reference (R2.2, R2.3, R2.4, R2.5)
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.hp.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.hp.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” (page 48).
• T4LogFile— specifies the file to which the driver is to write logging information. For
information about using this property, see “T4LogFile Property” (page 48).
If the application sets several property values, see “Precedence of Property Specifications”
(page 39) to determine which setting applies.
Example 8-1 Example of Setting Logging in properties File
These properties file entries set the logging level to SEVERE and specify a log file name:
T4LogLevel= SEVERE
T4LogFile=c:/T4logfile1.log
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 Java VM.
connection-id
If applicable, a unique ID for the connection associated with the message.
server-id
If applicable, information about the connectivity server associated with
the message. The server-id is of the form:
TCP:node-name.server-name/port-number:HPODBC
where
node-name
is the name of the Neoview database node.
server-name
is the name of the Neoview platform.
port-number
is the port to which the server is connected.
For example:
TCP:\banshee-tcp.$Z0133/46003:HPODBC
dialogue-id If applicable, the dialogue-id used for the NDCS 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.
74 Tracing and Logging Facilities