Closed spring-projects-issues closed 9 months ago
I was trying to figure out how to turn on extra logging, and came across that exact SO post, which lead me here. Debug logging would be so incredibly useful.
+1, I also find it useful to see ldap queries.
+1
+1
+1
+1
+1
+2 :)
Does someone want to create a PR for this?
+1
Rob, I'll take a look... Naor
+1
+1
+1
+1
+1 Has this really been an open issue for 8 years?
One workaround for manual searches is to log the Filter
returned by LdapQuery.filter()
.
LdapQuery query = query().where("someAttribute").is("some value")
.and(query().where("objectClass").not().is("unwanted"));
log.debug("LDAP query: " + query.filter());
List<?> results = repository.findAll(query);
...logs...
LDAP query: (&(someAttribute=some value)(!(objectClass=unwanted)))
+1 again. Having trouble understanding the ldap query behavior when comparing what ApacheDirectoryStudio returns vs. Spring-Data-LDAP.
Jose Martinez (Migrated from LDAP-310) said:
I would be useful for the debugging purposes to have log the final query string sent to the server as well as the parameters. Something we can copy-paste into the LDAP server and see how it runs. Similar to the way JdbcTemplate shows the queries and parameters executing a query.
I'm creating this Jira as per the following StackOverflow post: https://stackoverflow.com/questions/24061834/how-to-see-the-query-generated-by-spring-ldaptemplate.