Is there a way to log queries on Neo4J like Hibernate?
-
12-11-2019 - |
Question
So, here is the scenario:
- I have Neo4J server running locally with some data in it
- I have a web app using
spring-data-neo4j
The following code is based on the example code Cineasts:
public interface CrewRepository extends GraphRepository<Crew> {
Iterable<Crew> findByNameLike(String name);
@Query("start thinker=node({0}) match thinker-[:crews]-crews return crews")
Set<Crew> findByThinker(Long thinkerId);
}
No news here. The problem is: the query findByNameLike
doesn't work whereas the findByThinker
does.
I have modified my log configuration file many times - final version is the one below - but, doesn't matter what I try, I can't see any queries being logged - either on my log file or on the server.
<logger name="org.neo4j">
<level value="DEBUG" />
<appender-ref ref="console" />
</logger>
<logger name="org.springframework.data.neo4j">
<level value="DEBUG" />
<appender-ref ref="console" />
</logger>
<root>
<priority value="error" />
<appender-ref ref="console" />
</root>
All I want is the log the queries so I can see if it's a bug on spring-data-neo4j
or if I'm missing something... I have looked through the documentation of both, code examples and couldn't find anything that specific.
Any help? Thank you!
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow