You can set the following two properties:
pureQuery uses the java.util.logging framework. Within that framework, pureQuery names its parent logger com.ibm.pdq.logger. Using Java logging API conventions and tools, you and your applications can set the log level and log file for the com.ibm.pdq logger so that pureQuery log messages are forwarded to this logger.
Any application server which provides administrative tooling to configure loggers under the java.util.logging framework, such as WebSphere® Application Server 6.1, can configure the com.ibm.pdq logger to control pureQuery logging and tracing. Such a configuration provides an alternative to configuring pureQuery logging with pureQuery properties. pureQuery uses the com.ibm.pdq logger level if it is higher than the level that is specified for the pureQuery pdq.traceLevel property and if the com.ibm.pdq logger level is higher than INFO. In the WebSphere Application Server Integrated Solutions Console, you can set the com.ibm.pdq logger level by selecting Troubleshooting > Logs and Trace.
If the com.ibm.pdq logger trace level is set to a level that is more inclusive than INFO, and if pureQuery properties do not specify a level that is more inclusive than the com.ibm.pdq logger trace level, pureQuery inherits the level of the com.ibm.pdq logger.
If you plan to use WebSphere Application Server with your pureQuery application, you must set the level higher than INFO if you want to see pureQuery log entries in the log for WebSphere Application Server.
pureQuery does not explicitly integrate logging with JDBC driver logs. However, JDBC drivers which also log using the Java logging API can participate in the logging framework integration. This means that pureQuery and JDBC driver log entries are interleaved in the same log only if the JDBC driver also uses the Java logging framework and if both loggers are configured to write to the same target.
Exceptions that occur in non-pureQuery API applications that are run under pureQuery appear in pureQuery log files, if logging is configured for pureQuery. Some pureQuery entries might also appear in the JDBC driver log, if one is configured.
If your application uses the IBM® Data Server Driver for JDBC and SQLJ to connect to a supported DB2® database, and calls the getJccSpecialRegisterProperties() method on a Connection object, pureQuery can log the results of the first call to that method on the object. The message that pureQuery writes to the log lists all of the non-null values for the special registers that the driver supports for the database.
To see this message in the log, set the trace level to FINE.
When using DB2 Call Level Interface (CLI) or the IBM Data Server Driver with pureQuery Runtime, you can use the pureQuery Runtime property as a configuration keyword.
You can set the two keys in the db2cli.ini or dsdriver.cfg configuration file.
You can use an absolute path or a relative path to the directory in which the CLI application runs. If the file exists, new log messages are appended to the existing content of the file.
You can use an absolute path or a relative path to the directory in which the CLI application runs. If the file exists, new log messages are appended to the existing content of the file.
The following lines set the traceFile to /user/CLIOPTtraces.log and the traceLevel to INFO in a db2cli.ini file:
traceFile=/user/CLIOPTtraces.log traceLevel=INFO