Le 15/02/16 18:55, Timothy Keith a écrit :
> I am attempting to do pass-through authentication from an OpenLDAP
> server. I would to have debugging logs for all incoming requests.
>
> Tim
What kind of log do you want exactly ?
If you want to have some logs about every received message, you can
modify the log4j.properties to set the
org.apache.directory.server.ldap.handlers.request package to DEBUG.
You'll receive logs like :
LOG.debug( "Received: {}", bindRequest );
LOG.debug( "Handling request: {}", req );
LOG.debug( "Handling compare request while ignoring referrals:
{}", req );
LOG.debug( "Handling request: {}", req );
LOG.debug( "Handling modify dn request while ignoring referrals:
{}", req );
LOG.debug( "Handling request : {}", req );
LOG.debug( "Handling single reply request: {}", req );
LOG.debug( "Received: {}", unbindRequest );
Four problems here :
- not all the messages get logged (Abandon)
- not all extended operations are logged, and they use a different logger
- overall, the messages are not consistent
- you'll be flooded by logs you do'nt want.
A better option would be to set a logger on
org.apache.directory.api.ldap.codec.api.LdapDecoder. You will then get
the fully decoded LDAP message like :
LOG.debug( "Decoded LdapMessage : " + container );