# How to debug Soffid LDAP?

## Installation

### Prerequisites

To install **Soffid LDAP**, you must install [Docker](https://hub.docker.com/search?q=&type=edition&offering=community). Despite Docker desktop can be used for testing purposes, Docker container runtime usage is recommended.

### Steps to debug

1.- First of all, you have to add the **DEBUG environment variable** to your container

```
-e DEBUG: 65535
```

2.- You need to restart the Soffid LDAP container

```
sudo docker restart <YOUR_CONTAINER>
```

3.- In this point, you can check your LDAP

4.- Retrieve the log

5.- Delete the DEBUG environment variable

6.- Restart the Soffid LDAP container

### Log level

Multiple log levels may be used and the levels are additive. To display what numbers correspond to what kind of debugging, consult the table below. The possible values for &lt;integer&gt; are:

<table align="Center" border="" class="columns" id="bkmrk-level-description--1"><tbody><tr class="heading"><td align="Right">**Level**</td><td>**Description**</td></tr><tr><td align="Right">-1</td><td>enable all debugging</td></tr><tr><td align="Right">0</td><td>no debugging</td></tr><tr><td align="Right">1</td><td>trace function calls</td></tr><tr><td align="Right">2</td><td>debug packet handling</td></tr><tr><td align="Right">4</td><td>heavy trace debugging</td></tr><tr><td align="Right">8</td><td>connection management</td></tr><tr><td align="Right">16</td><td>print out packets sent and received</td></tr><tr><td align="Right">32</td><td>search filter processing</td></tr><tr><td align="Right">64</td><td>configuration processing</td></tr><tr><td align="Right">128</td><td>access control list processing</td></tr><tr><td align="Right">256</td><td>stats log connections/operations/results</td></tr><tr><td align="Right">512</td><td>stats log entries sent</td></tr><tr><td align="Right">1024</td><td>print communication with shell backends</td></tr><tr><td align="Right">2048</td><td>print entry parsing debugging</td></tr><tr><td align="Right">16384</td><td>syncrepl consumer processing</td></tr><tr><td align="Right">32768</td><td>only messages that get logged whatever log level is set</td></tr></tbody></table>

The desired log level can be input as a single integer that combines the (ORed) desired levels.