> ## Documentation Index
> Fetch the complete documentation index at: https://insightsoftware-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring Logging

<a id="configuring-logging" />

To help troubleshoot issues, you can enable logging in the connector.

<Warning>
  **Important:**

  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 Simba Amazon Athena JDBC Connector, so make sure to disable the feature after you are done using it.
</Warning>

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 Simba Amazon Athena JDBC Connector, in order from least verbose to most verbose.

<table><colgroup><col /><col /></colgroup><thead><tr><th scope="col">LogLevel Value</th><th scope="col">Description</th></tr></thead><tbody><tr><td><p>`0`</p></td><td><p>Disable all logging.</p></td></tr><tr><td><p>`1`</p></td><td><p>Log severe error events that lead the connector to abort.</p></td></tr><tr><td><p>`2`</p></td><td><p>Log error events that might allow the connector to continue running.</p></td></tr><tr><td><p>`3`</p></td><td><p>Log events that might result in an error if action is not taken.</p></td></tr><tr><td><p>`4`</p></td><td><p>Log general information that describes the progress of the connector.</p></td></tr><tr><td><p>`5`</p></td><td><p>Log detailed information that is useful for debugging the connector.</p></td></tr><tr><td><p>`6`</p></td><td><p>Log all connector activity.</p></td></tr></tbody></table>

<Note>
  **Note:**

  If `UseAwsLogger` is set to `1`, the connector also logs information from AWS API calls.
</Note>

To enable logging:

1. Set the `LogLevel` property to the desired level of information to include in log files.
2. Set the `LogPath` property 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.

For example, the following connection URL enables logging level 3 and saves the log files in the `C:\temp` folder:

```
jdbc:awsathena://AwsRegion=us-east-1;User=ABCABCABC123ABCABC45;Password=bCD+E1f2Gxhi3J4klmN/OP5QrSTuvwXYzabcdEF;S3OutputLocation=s3://test-athena-results/;LogLevel=3;LogPath=C:\\temp
```

3. Optionally, to include information about AWS API calls in the log, set `UseAwsLogger` to `1`.
4. To make sure that the new settings take effect, restart your JDBC application and reconnect to the server.

The Simba Amazon Athena JDBC Connector produces the following log files in the location specified in the `LogPath` property:

* An `Athena``JDBC``_driver.log` file that logs connector activity that is not specific to a connection.
* An `Athena``JDBC``_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 the `LogPath` value is invalid, then the connector sends the logged information to the standard output stream (`System.out`).

To disable logging:

1. Set the `LogLevel` property to `0`.
2. To make sure that the new setting takes effect, restart your JDBC application and reconnect to the server.
