How do I enable debug logs in my Athena JDBC/ODBC driver?

Last updated: 2021-05-05

I want to enable debug logs in my Amazon Athena Java Database Connectivity (JDBC)/Open Database Connectivity (ODBC) driver.

Resolution

You can configure logging in the Athena JDBC/ODBC driver to help you troubleshoot issues and errors.

Important: Enable logging only for the required amount of time to capture an issue. Logging decreases performance and might take up a large quantity of disk space.

JDBC driver

For information on activating logging in the JDBC driver, see Simba documentation for Configuring logging. To capture the debug logs, configure the following properties in your JDBC driver:

  • For LogLevel, select 5
  • For UseAwsLogger, select 1.
    Note: With this property, the JDBC driver logs information from AWS API calls as well.
  • For LogPath, enter a location on your host machine where you want the driver logs to be captured.

You can also activate logging by configuring similar options in your business intelligence tool.

To be sure that the new settings take effect, restart your JDBC application, and then reconnect to the server. The Simba Athena JDBC Driver produces the following log files in the location specified in the LogPath property:

  • AthenaJDBC_driver.log file with logs on driver activity that's not specific to the connection.
  • AthenaJDBC_connection_[1234].log file for each connection made to the database. The number 1234 in the file name identifies the log file. This file logs driver activity that's specific to the connection.

If the LogPath value isn't valid, then the driver sends the logged information to the standard output stream (System.out).

ODBC driver

For information on activating logging for your ODBC driver, see Simba documentation for Simba Athena ODBC driver with SQL connector.

To download the ODBC driver, see Connecting to Amazon Athena with ODBC.

To activate logging in the ODBC driver for your Windows machine, do the following:

  1. From the Start menu, choose ODBC Data Sources.
  2. In the ODBC Data Source Administrator, choose the System DSN tab.
  3. Choose Add.
  4. Form the list of drivers, select Simba Athena ODBC Driver.
  5. Choose Finish.
    A new wizard opens where you can add information, such as AWS Region, schema, workgroup, and Amazon Simple Storage Service (Amazon S3) output location, and AWS Key Management Service (AWS KMS) key.
  6. Choose Logging Options.
    For Log Level, select INFO.
    For Log Path, select a path on your Windows machine.
    Choose OK.

The ODBC driver logs required for troubleshooting are generated in the log path that you selected.

To activate logging in the ODBC driver for your non-Windows machine, do the following:

Linux: Edit the /opt/simba/athenaodbc/lib/64/simba.athenaodbc.ini file, and then configure the following properties:

  • For LogLevel, select 5.
  • For LogPath, enter a path to your host.

MAC: Edit the /Library/simba/athenaodbc/lib/simba.athenaodbc.ini file, and then configure the following properties:

  • For LogLevel, select 5.
  • For LogPath, enter a path to your host.

Save the simba.athenaodbc.ini configuration file and restart your ODBC application to make sure that the new settings are effective. The Simba Athena ODBC Driver produces the following log files at the location you specify using the LogPath key:

  • The simbaathenaodbcdriver.log file with logs on driver activity that's not specific to the connection.
  • The simbaathenaodbcdriver_connection_1234.log file for each connection made to the database. The number 1234 in the file name identifies the log file. This file logs driver activity that is specific to the connection.

Did this article help?


Do you need billing or technical support?