JDBC debug logging
The debug logging mechanism for JDBC is available with the GUI or with options for the connection URL.
The options for the connection URL are described in the following sections.
loglevel
You can set the following log levels, which are not case sensitive:
Level | Number | Result |
---|---|---|
off | 0 | No messages are logged (default). |
debug | 2 | Logging is done at the debug level. Every message is logged. |
info | 3 | Only information messages, entry and exit statements, and unrecoverable messages are logged. |
entry_exit | 4 | Only entry and exit statements and unrecoverable messages are logged. |
fatal | 5 | Only unrecoverable messages are logged. |
Enter the log level by using the type or the number, as in the
following
examples:
loglevel=entry_exit
loglevel=4
loggertype
You can set the log format types as follows. The values are not
case sensitive.
loggertype=text
(default)loggertype=html
logdirpath
You can set the directory path for the log files as shown:
logdirpath=path_on_the_local_file_system
The default values for the logdirpath option
are as follows:
- Windows: C:\
- UNIX and Linux® operating systems: /tmp/ directory
The log file name for JDBC is
nzjdbc_timestamp.LOGEXTENSION, where:
- timestamp is in the format YYYY-MM-DD_HH-MM-SS.
- LOGEXTENSION is either log or HTML, depending on whether the loggertype option is set to text or HTML.
Examples
Separate connection string components with a semicolon, as in the
following
examples:
jdbc:netezza://<host>/<database>;user=<username>;password=<password>;
loglevel=<log_level>;logdirpath=<log_directory>
The following example applies to a UNIX operating
system:
jdbc:netezza://tom/will;user=admin;password=password;loglevel=2;
logdirpath=/jdbc_log_file
The following example applies to a Windows operating
system:
jdbc:netezza://tom/will;user=admin;password=password;loglevel=2;
logdirpath=C:\