Search code examples
javahibernateloggingneo4jhibernate-ogm

How to disable logging Neo4j queries in Hibernate OGM?


I'm using Hibernate OGM with Neo4j database.

For every operation, like creating new entity, there are many log entries with Cypher queries produced:

...
2015-02-27 11:09:41.825+0000 INFO  [org.neo4j]: CREATE (n:ENTITY:TreeElement {id: {0}}) RETURN n
2015-02-27 11:09:41.869+0000 INFO  [org.neo4j]: CREATE (n:ENTITY:TreeElement {id: {0}}) RETURN n
2015-02-27 11:09:41.873+0000 INFO  [org.neo4j]: MATCH (n:ENTITY:TreeElement {id: {0}}) RETURN n
2015-02-27 11:09:41.908+0000 INFO  [org.neo4j]: MATCH (n:ENTITY:TreeElement {id: {0}}) RETURN n
2015-02-27 11:09:41.911+0000 INFO  [org.neo4j]: CREATE (n:ENTITY:TreeElement {id: {0}}) RETURN n
2015-02-27 11:09:41.913+0000 INFO  [org.neo4j]: MATCH (n:ENTITY:TreeElement {id: {0}}) RETURN n
2015-02-27 11:09:41.914+0000 INFO  [org.neo4j]: MATCH (n:ENTITY:TreeElement {id: {0}}) RETURN n
...

How to disable this?

I've tried setting hibernate.show_sql property in persistance.xml file:

   <property name = "hibernate.show_sql" value = "false" />

, but with no result.


Solution

  • I don't think there is a way to disable it. I 've created https://hibernate.atlassian.net/browse/OGM-755 to keep track of the issue.