Configuring Logging Options

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

Important:

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

You can set the connection properties described below in a connection string, in a DSN (in the odbc.ini file), or as a connector-wide setting (in the simba.sparkodbc.ini file). Settings in the connection string take precedence over settings in the DSN, and settings in the DSN take precedence over connector-wide settings.

To enable logging:

  1. To specify the level of information to include in log files, set the LogLevel property to one of the following numbers:
  2. LogLevel Value Description

    0

    Disables all logging.

    1

    Logs severe error events that lead the connector to abort.

    2

    Logs error events that might allow the connector to continue running.

    3

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

    4

    Logs general information that describes the progress of the connector.

    5

    Logs detailed information that is useful for debugging the connector.

    6

    Logs all connector activity.

  3. Set the LogPath key to the full path to the folder where you want to save log files.
  4. Set the LogFileCount key to the maximum number of log files to keep.
  5. Note:

    After the maximum number of log files is reached, each time an additional file is created, the connector deletes the oldest log file.

  6. Set the LogFileSize key to the maximum size of each log file in bytes.
  7. Note:

    After the maximum file size is reached, the connector creates a new file and continues logging.

  8. Save the simba.sparkodbc.ini configuration file.
  9. Restart your ODBC application to make sure that the new settings take effect.

The Simba Apache Spark ODBC Connector produces the following log files at the location you specify using the LogPath key:

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

To disable logging:

  1. Set the LogLevel key to 0.
  2. Save the simba.sparkodbc.ini configuration file.
  3. Restart your ODBC application to make sure that the new settings take effect.