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.athenaodbc.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.

    Note:

    If UseAwsLogger is set to 1, the connector also logs information from AWS API calls.

  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. Optionally, to prefix the log file name with the user name and process ID associated with the connection, set the UseLogPrefix property to 1.
  9. Optionally, to include information about AWS API calls in the log, set UseAwsLogger to 1.
  10. Save the simba.athenaodbc.ini configuration file.
  11. Restart your ODBC application to make sure that the new settings take effect.

The Simba Athena ODBC Driver produces the following log files at the location you specify using the LogPath key:

  • A simbaathenaodbcdriver.log file that logs connector activity that is not specific to a connection.
  • A simbaathenaodbcdriver_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.

If you set the UseLogPrefix property to 1, then each file name is prefixed with [UserName]_[ProcessID]_, where [UserName] is the user name associated with the connection and [ProcessID] is the process ID of the application through which the connection is made. For more information, see UseLogPrefix.

To disable logging:

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