title: Log commands that are sent to the LDAP server
body: <p>We are using <code>.NET Core 3.1</code> and <code>Novell.Directory.Ldap.NETStandard 3.4.0</code> to authenticate users against LDAP server. This is the code that we use:</p>
  <pre class="lang-cs prettyprint-override"><code>public PasswordVerificationResult Login(string username, string password)
  {
      using (var connection = new LdapConnection { SecureSocketLayer = true })
      {
          connection.Connect(&quot;LDAP URL&quot;, 636);
          connection.Bind($&quot;COMPANY\\{username}&quot;, password);
          if (connection.Bound)
          {
              return PasswordVerificationResult.Success;
          }
      }
      return PasswordVerificationResult.Failed;
  }
  </code></pre>
  <p>For debug purposes, we would like to see commands which were generated by Novell library and sent to LDAP server (ex. <code>(&amp;(USER=Uname)(PASSWORD=Pwd))</code>). Can we log them somehow?</p>