Menu
Simba Technologies
Simba Technologies

Simba Spark JDBC Driver with SQL Connector 2.6.16
Installation and Configuration Guide

Configuring Logging

To help troubleshoot issues, you can enable logging in the driver.

Important:

Only enable logging long enough to capture an issue. Logging decreases performance and can consume a large quantity of disk space.

The settings for logging apply to every connection that uses the Simba Spark JDBC Driver, so make sure to disable the feature after you are done using it.

In the connection URL, set the LogLevel key to enable logging at the desired level of detail. The following table lists the logging levels provided by the Simba Spark JDBC Driver, in order from least verbose to most verbose.

LogLevel Value Description

0

Disable all logging.

1

Log severe error events that lead the driver to abort.

2

Log error events that might allow the driver to continue running.

3

Log events that might result in an error if action is not taken.

4

Log general information that describes the progress of the driver.

5

Log detailed information that is useful for debugging the driver.

6

Log all driver activity.

To enable logging:

  1. Set the LogLevel property to the desired level of information to include in log files.
  2. Set the LogPath property to the full path to the folder where you want to save log files. To make sure that the connection URL is compatible with all JDBC applications, escape the backslashes (\) in your file path by typing another backslash.
  3. For example, the following connection URL enables logging level 3 and saves the log files in the C:\temp folder:

    jdbc:spark://localhost:11000;LogLevel=3;LogPath=C:\\temp

  4. To make sure that the new settings take effect, restart your JDBC application and reconnect to the server.

The Simba Spark JDBC Driver produces the following log files in the location specified in the LogPath property:

  • A SparkJDBC_driver.log file that logs driver activity that is not specific to a connection.
  • A SparkJDBC_connection_[Number].log file for each connection made to the database, where [Number] is a number that identifies each log file. This file logs driver activity that is specific to the connection.

If the LogPath value is invalid, then the driver sends the logged information to the standard output stream (System.out).

To disable logging:

  1. Set the LogLevel property to 0.
  2. To make sure that the new setting takes effect, restart your JDBC application and reconnect to the server.