You can enable logging in the driver to track activity and troubleshoot issues.

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

If you require Driver Manager logs, please see the article: ODBC Troubleshooting: How to Enable Driver-manager Tracing


Jump to JDBC Drivers


ODBC Driver Logging

Windows Driver – Using the logging dialog box

Note: The Salesforce Driver has been shown in the screenshots, but the process is very similar for all Simba ODBC drivers.

  1. Click the Start button, then click All Programs, then click the program group corresponding to the driver, and then click ODBC Administrator
  2. Select the DSN for which you want to log connection activity, and then click Configure
    configure
  3. In the DSN Setup dialog box, click Logging Options
    options
  4. Information on all of the Log Levels is listed below.  LOG_TRACE is best in most cases.
    • LOG_OFF disables all logging.
    • LOG_FATAL logs very severe error events that might lead the driver to abort.
    • LOG_ERROR logs error events that might still allow the driver to continue running.
    • LOG_WARNING logs potentially harmful situations.
    • LOG_INFO logs general information that describes the progress of the driver.
    • LOG_DEBUG logs detailed information that is useful for debugging the driver.
    • LOG_TRACE logs more detailed information than the LOG_DEBUG level.
  5. In the Log Path (or Log Directory) field, type the full path to the folder where you want to save log files.
    Log
  6. (Only available in some drivers) In the Max Number Files field, type the maximum number of log files to keep.
    Note: After the maximum number of log files is reached, each time an additional file is created, the driver deletes the oldest file.
  7. (Only available in some drivers) In the Max File Size field, type the maximum size of each log file in megabytes (MB).
    Note: After the maximum file size is reached, the driver creates a new file and continues logging.
  8. Click OK to close the Logging Options dialog box.
  9. Click OK to save your settings and close the DSN Configuration dialog box.
    Note: Configuration changes will not be saved or picked up by the driver until you have clicked OK in the DSN Configuration dialog box.
    Clicking Cancel, or the ‘X’ button will result in the changes being discarded.
  10. Restart the application you are using the driver with.  Configuration changes will not be picked up by the application until it reloads the driver.

 

Mac OSX and Linux ODBC Drivers

  1. Open the driver configuration file in a text editor.
    For example, for the Simba ODBC Driver for Salesforce, you would open the simba.salesforceodbc.ini file.
    Note: This file is usually in the same folder as the driver binary.  It may also be a hidden file in the users home directory.
  2. Information on all of the Log Levels is listed below.  6  is best in most cases.
    Note: In some cases, if you obtained the driver from one of our partners, the file pre-fix may not be “simba”.
    • 0 disables all logging.
    • 1 logs very severe error events that might lead the driver to abort.
    • 2 logs error events that might still allow the driver to continue running.
    • 3 logs potentially harmful situations.
    • 4 logs general information that describes the progress of the driver.
    • 5 logs detailed information that is useful for debugging the driver.
    • 6 (TRACE) logs more detailed information than log level 5.

    For example: LogLevel=6

  3. Set the LogPath attribute to the full path to the folder where you want to save log files.  This directory mus exist and be writable, including being writable by other users if the application using the driver runs as a specific user.
    For example: LogPath=/localhome/username/Documents
    unix
  4. (Only available in some drivers) Set the LogFileCount attribute to the maximum number of log files to keep.
    For example: LogFileCount=5
    Note: After the maximum number of log files is reached, each time an additional file is created, the driver deletes the oldest file.
  5. (Only available in some drivers) Set the LogFileSize attribute to the maximum size of each log file in megabytes (MB).
    For example: LogFileSize=20
    Note: After the maximum file size is reached, the driver creates a new file and continues logging.
  6. Save the driver configuration file.
  7. Restart the application you are using the driver with.  Configuration changes will not be picked up by the application until it reloads the driver.

JDBC Driver Logging

To enable logging in JDBC drivers, you need to append the proper key/value pairs to your connection string or connection URL.  The required pairs are:

  • LogLevel=<desiredLevel>
  • LogPath=<desiredPath>

For Example, with the Couchbase JDBC Driver and Squirrel, you would use a connection URL like:

jdbc:couchbase://192.168.33.163:8093;LogLevel=6;LogPath=D:\JDBC\logs;

JDBCLog

The value given for LogPath must exist and be a writable directory.  use appropriate path separators based on your operating system.  For example, in Linux or Mac you could use something like:

LogPath=/tmp;

There are 6 log levels.  Level 6 is equivalent to TRACE and is the most useful when working on a support ticket.  The levels are:

  • 0 disables all logging.
  • 1 logs very severe error events that might lead the driver to abort.
  • 2 logs error events that might still allow the driver to continue running.
  • 3 logs potentially harmful situations.
  • 4 logs general information that describes the progress of the driver.
  • 5 logs detailed information that is useful for debugging the driver.
  • 6 (TRACE) logs more detailed information than log level 5.

Note: logging should not be enabled for normal driver use.  It will take up disk space and impact driver performance.