Logging options
Warning
Security: When logging is enabled at verbose levels (DEBUG or TRACE), the AWS SDK used by the driver may log sensitive information such as authentication tokens and credentials in plaintext. Use verbose logging only for troubleshooting, and ensure log files are stored securely and deleted after use. Do not enable verbose logging in production environments.
Administrator rights are required to modify the settings described here. To make the changes, you can use the ODBC Data Source Administrator Logging Options dialog box or modify the Windows registry directly.
Log level
This option enables ODBC driver logs with different levels of detail. In Windows, you can use the registry or a dialog box to configure logging. The option is located in the following registry path:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Amazon Athena\ODBC\Driver
The following log levels are available:
OFF- Logging is disabledERROR- Only error messages are loggedWARN- Warning messages and errors are loggedINFO- Informational messages, warnings, and errors are loggedDEBUG- Detailed debug information plus all lower level messages are loggedTRACE- Most detailed level of logging, includes all messages
A value that the driver does not recognize causes the connection to fail with SQLSTATE
HY000. An empty value is treated as not set. If the level in the registry
or odbc.ini is anything other than OFF, LogPath
must also be set. Otherwise the connection fails with the message "LogLevel enables
logging but LogPath is missing".
The driver accepts LogLevel in a DSN or connection string but only
validates the value. The logging level in effect is the one set in the Windows registry
or odbc.ini.
Note
Each log level includes all messages from the levels below it. Higher log levels may impact performance and generate larger log files.
| Connection string name | Parameter type | Default value | Connection string example |
|---|---|---|---|
| LogLevel | Optional | OFF |
LogLevel=INFO; |
Log path
Specifies path to the file where the ODBC driver logs are stored. You can use the registry or a dialog box to set this value. The option is located in the following registry path:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Amazon Athena\ODBC\Driver
At the ERROR and WARN levels, the driver creates the log
file when it writes the first message.
| Connection string name | Parameter type | Default value | Connection string example |
|---|---|---|---|
| LogPath | Optional | none |
LogPath=C:\Users\ |
Use AWS Logger
Specifies if AWS SDK logging is enabled. Specify 1 to enable, 0 to disable.
| Connection string name | Parameter type | Default value | Connection string example |
|---|---|---|---|
| UseAwsLogger | Optional | 0 |
UseAwsLogger=0; |
Note
Logs may log sensitive information when UseAwsLogger is enabled
and LogLevel is set to DEBUG or TRACE.
UseAwsLogger is recommended only for troubleshooting purposes.