Discussion Forum

How to disable debug messages?

Good morning,

I’m developing some custom ETLs and when I run them inside Eclipse tons of debug messages are printed in Console.

For example:

08:27:50.297 [main] DEBUG c.t.t.d.l.c.ExpectedValueCheckingStoreManager - Transaction com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction@4351171a holds no locks: writing mutations using store transaction CassandraTransaction@10b892d5[read=QUORUM,write=QUORUM]
08:27:50.303 [main] DEBUG c.t.t.g.transaction.StandardTitanTx - Guava vertex cache size: requested=20000 effective=20000 (min=100)
08:27:50.303 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created dirty vertex map with initial size 32
08:27:50.303 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created vertex cache with max size 20000
08:27:50.303 [main] DEBUG c.t.t.d.c.CassandraTransaction - Created CassandraTransaction@3c2772d1[read=QUORUM,write=QUORUM]
08:27:50.303 [main] DEBUG c.t.t.d.c.CassandraTransaction - Created CassandraTransaction@37d00a23[read=QUORUM,write=QUORUM]
08:27:50.303 [main] DEBUG c.t.t.g.t.TitanBlueprintsGraph - Created new thread-bound transaction standardtitantx[0x433e536f]
08:27:50.303 [main] DEBUG a.g.g.internal.AbstractGraknGraph - Graph committed.
08:27:50.303 [main] DEBUG c.t.t.d.c.CassandraTransaction - Created CassandraTransaction@89c65d5[read=QUORUM,write=QUORUM]

How to disable/control such logging?

I’m on 0.9.0 and I simply open the graph with

GraknGraph graph = Grakn.factory(Grakn.DEFAULT_URI, "biograph").getGraph();

or

GraknGraph graph = Grakn.factory(Grakn.DEFAULT_URI, "biograph").getGraphBatchLoading();

Thanks,
Antonio

Hi @xMAnton,

Try this:

    import ch.qos.logback.classic.Logger;

    Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
    logger.setLevel(Level.OFF);
    org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.ERROR); 

That should switch off the debug logs.