Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to see the query generated by spring ldapTemplate

I am using spring ldapTemplate version 1.3.2 to query results from active directory. We would like to be able to see the query generated by ldapTemplate.search() and similar methods in order to debug deployments of our product to clients.

So far we have tried looking in the docs to see if there's a "toString" method that would provide this but didn't find anything. We also changed the debug level in log4j.properties file:log4j.logger.org.springframework.security=DEBUG. This seems to give us more verbose output but doesn't actually display the full ldap query string.

Any help would be appreciated.

like image 433
user3865286 Avatar asked Sep 30 '22 15:09

user3865286


1 Answers

Unfortunately this information is currently not logged by the library. It does seem reasonable that it should be able to do so though. Please file a jira issue here: https://jira.spring.io/browse/LDAP, and please make sure to be as specific as possible with regards to what should be logged.

Finally, I would like to encourage you to upgrade to the latest version of the library. Current version is 2.0.2.

like image 123
marthursson Avatar answered Nov 01 '22 15:11

marthursson