With latest Java COuchbase 4 SDK using Repository and @Query stmts but could not able to enable the logs to findout the exact query

Could you please help to enable Query logs that used internally for this code snippet
public interface UserRepository extends CouchbaseRepository<User, String> {

@Query("#{#n1ql.selectEntity} WHERE name = $1 limit 10")

List<User> getUserByName(String name);

Hello @Vasavi , this post should answer your question: Spring Data Log Queries: How to Set Your Configuration

The tl;dr; would be to add this to your application.properties file:
logging.level.org.springframework.data.couchbase.repository.query: DEBUG

I think that blog is outdated.

the package is org.springframework.data.couchbase.core


package org.springframework.data.couchbase.core;
private static final Logger LOG = LoggerFactory.getLogger(ReactiveFindByQueryOperationSupport.class);
if (LOG.isDebugEnabled()) {
	LOG.debug("findByQuery {} statement: {}", pArgs, statement);

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.