Repository query logging in springdatacouchbase 4.1.1

Hi @deniswsrosa,
I tried applying query logging with springboot 2.4 and springdata couchbase 4.1.1 with couchbase 7 beta server following your article.

But queries are not logged.Below is my logback-spring.xml and I have logback-classic.2.3 jar in classpath.

<configuration debug="true">
	<appender name="STDOUT"
		class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>%d{HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
			</pattern>
		</encoder>
	</appender>
	<logger
		name="org.springframework.data.couchbase.repository.query"
		level="DEBUG" />
	<root level="info">
		<appender-ref ref="STDOUT" />
	</root>
</configuration> 

What could have gone wrong here?
Thanks,
Isuru

There should be an “application.properties” file in your sourcetree.
Add this into it: logging.level.org.springframework.data.couchbase.repository.query: DEBUG

Hi @iisuru!

Can you please try logging the org.springframework.data.couchbase.core.query package instead? Let me know if that works.

The Spring Data Couchbase 4 SDK has been almost completely rewritten while compared with the previous version, so this specific item might have been left out. In both cases, please feel free to follow this issue and comment on it if you need anything else:
https://github.com/spring-projects/spring-data-couchbase/issues/1045 .

@deniswsrosa,
It does not work even after " org.springframework.data.couchbase.core.query" package is adapted.
I will follow this topic "https://github.com/spring-projects/spring-data-couchbase/issues/1045 "

I will wait till above github issue progresses since no progress has been made so far.

Thanks
Isuru

Are there any progress with this issue?

Thanks, Raman.

Looks like no

Updated 19d ago

It works now:

logging:
  level:
    org.springframework.data.couchbase.core: TRACE
1 Like