Configuring Logging Options
To help troubleshoot issues, you can enable logging in the connector.
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.amazonredshiftodbc.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:
- To specify the level of information to include in log files, set the
LogLevel
property to one of the following numbers: - Set the
LogPath
key to the full path to the folder where you want to save log files. - Set the
LogFileCount
key to the maximum number of log files to keep. - Set the
LogFileSize
key to the maximum size of each log file in bytes. - Optionally, to prefix the log file name with the user name and process ID associated with the connection, set the
UseLogPrefix
property to1
. - Save the
simba.amazonredshiftodbc.ini
configuration file. - Restart your ODBC application to make sure that the new settings take effect.
LogLevel Value | Description |
---|---|
|
Disables all logging. |
|
Logs severe error events that lead the connector to abort. |
|
Logs error events that might allow the connector to continue running. |
|
Logs events that might result in an error if action is not taken. |
|
Logs general information that describes the progress of the connector. |
|
Logs detailed information that is useful for debugging the connector. |
|
Logs all connector activity. |
Note:
After the maximum number of log files is reached, each time an additional file is created, the connector deletes the oldest log file.
Note:
After the maximum file size is reached, the connector creates a new file and continues logging.
The Simba Amazon Redshift ODBC Connector produces the following log files at the location you specify using the LogPath
key:
- A
redshiftodbcdriver.log
file that logs connector activity that is not specific to a connection. - A
redshiftodbcdriver_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 on page 1.
To disable logging:
- Open the
simba.amazonredshiftodbc.ini
configuration file in a text editor. - Set the
LogLevel
key to0
. - Save the
simba.amazonredshiftodbc.ini
configuration file. - Restart your ODBC application to make sure that the new settings take effect.
- Configuring the Connector on page 1