Configuring Logging
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.
The settings for logging apply to every connection that uses the Product, so make sure to disable the feature after you are done using it.
In the connection URL, set the LogLevel key to enable logging at the desired level of detail. The following table lists the logging levels provided by the Product, in order from least verbose to most verbose.
| LogLevel Value | Description |
|---|---|
|
Disable all logging. |
|
Log severe error events that lead the connector to abort. |
|
Log error events that might allow the connector to continue running. |
|
Log events that might result in an error if action is not taken. |
|
Log general information that describes the progress of the connector. |
|
Log detailed information that is useful for debugging the connector. |
|
Log all connector activity. |
Note:
If UseAwsLogger is set to 1, the connector also logs information from AWS API calls.
To enable logging:
- Set the
LogLevelproperty to the desired level of information to include in log files. - Set the
LogPathproperty to the full path to the folder where you want to save log files. To make sure that the connection URL is compatible with all JDBC applications, escape the backslashes (\) in your file path by typing another backslash. - Optionally, to include information about AWS API calls in the log, set
UseAwsLoggerto1. - Optionally, to include information from the Database Java connector in the log, set
EnableJavaDriverLoggingtotrue. - Optionally, to create trace-level connection logs from the Database web server connector, set
EnableWSCTraceLoggingto1. - To make sure that the new settings take effect, restart your JDBC application and reconnect to the serverworkbook.
For example, the following connection URL enables logging level 3 and saves the log files in the C:\temp folder:
jdbc:database://localhost:11000;LogLevel=3;LogPath=C:\\temp
jdbc:://localhost:11000;LogLevel=3;LogPath=C:\\temp
jdbc:database://localhost;LogLevel=3;LogPath=C:\\temp
jdbc:database://redshift.company.us-west-1.redshift.amazonaws.com:9000/Default;LogLevel=3;LogPath=C:\temp
jdbc:database:drillbit=localhost;LogLevel=3;LogPath=C:\\temp
jdbc:database://localhost/TeamRoster?LogLevel=3&
LogPath=C:\\temp
jdbc:database://archimedes:5480?LogLevel=3&LogPath=C:\\temp
jdbc:database://archimedes:5480/TeamRoster?UID=skroob&PWD=12345&LogLevel=3&LogPath=C:\\temp
jdbc:database:Region=us-west-1;LocalMetadataFile=C:\\database\\schema.json;CredentialFilePath=C:\\database\\credentials.txt;ProfileName=simba;LogLevel=3;LogPath=C:\\temp
jdbc:database://localhost;LogLevel=3;LogPath=C:\\temp
jdbc:awsdatabase://AwsRegion=us-east-1;User=ABCABCABC123ABCABC45;Password=bCD+E1f2Gxhi3J4klmN/OP5QrSTuvwXYzabcdEF;S3OutputLocation=s3://test-athena-results/;LogLevel=3;LogPath=C:\\temp
jdbc:database://FilePath=C:\\Projects\\ExcelJDBC\\sampleworkbook.xlsx;LogLevel=3;LogPath=C:\\temp
Important:
Enabling the EnableWSCTraceLogging property captures the authentication credentials in plain text. Use this feature at your own risk.
The Product produces a log file named DriverLog.log in the location specified in the LogPath property.
The Product produces the following log files in the location specified in the LogPath property:
- A
simbadatabasejdbcdriver.logfile that logs connector activity that is not specific to a connection. - A
simbadatabasejdbcdriver_connection_[Number].logfile 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.
- An
MDBJDriver_driver.logfile that logs connector activity that is not specific to a connection. - An
JDBCfile that logs connector activity that is not specific to a connection._driver.log - An
JDBC_connection_[Number].logfile 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. - A
DatabaseJDBC_connection_[Number].logandDatabaseJDBC_connection_ext_[Number].logfile for each connection made to the database, where [Number] is a number that identifies each log file. These files log connector activity that is specific to the connection. - When
EnableWSCTraceLoggingis set to1, the connector also produces aDatabase_connection_[Number]_traceLogs.txtfile for each connection made to the database, where [Number] is a number that identifies each log file. The file contains additional trace information.
If the LogPath value is invalid, then the connector sends the logged information to the standard output stream (System.out).
To disable logging:
- Set the
LogLevelproperty to0. - To make sure that the new setting takes effect, restart your JDBC application and reconnect to the server.
- Additional Logging
- Configuring the Product on page 1
- Building the Connection URL
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- Building the Connection URL on page 1
- LogLevel
- LogPath