Logging provides visibility into Parasoft JDBC Driver operations (e.g,., events and exceptions). This visibility is helpful when you start your initial database virtualization efforts because it facilitates analysis of configuration problems. It is also helpful when you are trying to diagnose the cause of unexpected behavior.

To configure remote logging for a Parasoft JDBC Driver:

  1. Ensure that your application and its corresponding JDBC/Data Source configuration is setup to use the Parasoft JDBC Driver. See About the Parasoft JDBC Driver for links to the available configuration topics.
  2. Open the associated JDBC Controller (from either the Virtualize Server view or the related Environment Manager instance) and do the following:
    1. Set the Log Level to 1 or greater.
    2. Set the Log Destination Type to the desired destination.
    3. If Log Destination Type is set to file, and Log Level is set to 1, use Log File to specify the desired path to that file.

Log Level

The log level settings specifies the logging detail level (verbosity) for the Parasoft JDBC Driver. The logs are routed to the destination provided in the Log Destination Type setting.

Available options are:

0OFF. No logging takes place to any destination.
1Log errors only. Stack traces are included in such errors.
2Log errors and informational events to help debug and analyze issues
3Include stack traces with each logging entry
4Include traffic communicated between the Parasoft JDBC Driver and the Virtualize Server, but with no stack traces
5Includes 3 and 4 data.

Use logging levels 3 and 5 with caution under limited circumstances and scenario runs only. Including stack traces for each informational log entry tends to grow the log file content very rapidly.

Log Destination Type

The Log Destination Type setting indicates where driver logging data should be saved or sent. This pertains to internal driver logging information, not where the database data is recorded. Once this option is set, future driver logging data will be routed to the specified destination.

Available options are:

FileSaves into the specified log file location (on the machine where the Parasoft JDBC Driver  is installed).
ServerSubmits the logging data to a remote Parasoft Virtualize Server so it can be viewed and analyzed there. This is convenient so that configuration debugging can be performed without having to  access local log files on the application server where the Parasoft JDBC Driver is installed. The logging events are buffered, then transmitted in bursts every 5 seconds. See Additional Setup for Server Logging for details.
stdoutRoutes Parasoft JDBC Driver logging events to the standard console output.
stderrRoutes Parasoft JDBC Driver logging events to the standard console error output.

Additional Setup for Server Logging

The server logging options indicates that logging data should be sent to a remote Virtualize Server that is not necessarily running on the same host where the Parasoft JDBC Driver is. This helps with analyzing configuration problems and resolving issues without needing to directly access the file system of the host of the Parasoft JDBC Driver. It is also helpful for cases when security permissions do not allow the Parasoft JDBC Driver to write to the local file system

For server logging, you also need to perform the following configuration on the Virtualize Server:

  1. Deploy the ServerLogger.pva. file into the VirtualAssets project. You can do this by switching to the Navigator view in Virtualize and dragging that .pva file from your systems file explorer to the VirtualAssets project in Virtualize.
    • The ServerLogger.pva is a specially-configured virtual asset for receiving the Parasoft JDBC Driver log entries and saving them into a file. It can be found under [virtualize installation directory]/proxies/ServerLogger.pva.
  2. Modify the HTTP path of the deployed asset to /ServerLogger (which should make the HTTP endpoint something like http://fox.parasoft.com:9080/ServerLogger).
  3. (Optional) Open the .pva file (using the Virtual Asset Explorer view) and modify the local log file destination if desired. The pva is configured to save the logs to recorded_database_data/jdbc_proxy_driver_log.txt, which is a convenient location adjacent to the database recorded data files when working on recording activities.
    Once this setup is applied, the Parasoft JDBC Driver will send its logging (at the specified verbosity and detail) to Virtualize Server, which will use ServerLogger.pva to save the data to a file.

Log File

The Log File setting is applicable when Log Destination Type is set to file, and Log Level is set to  1 or higher. In these cases, the Log File setting specifies the full path to a text file where Parasoft JDBC Driver logging should be saved.

This property refers to the location of the local log file that is produced for debugging purposes (e.g. events and exceptions coming from the actual JDBC driver). This is NOT the location of the file that logs recorded data. That file is always stored in the Virtual Assets project.

  • No labels