Enable logging for queries

935 views
Skip to first unread message

Ankur Goel

unread,
Sep 13, 2017, 6:09:10 AM9/13/17
to JanusGraph users
Hi,

I am using JanusGraph 0.1.1. And using logback:

       <logger name="org.janusgraph" level="DEBUG" additivity="false">

<appender-ref ref="CONSOLE" />

</logger>


<logger name="org.apache" level="DEBUG" additivity="false">

<appender-ref ref="CONSOLE" />

</logger>

        <root level="debug">

<appender-ref ref="CONSOLE" />

</root>


This result in following output only:

15:28:23,108  INFO ReflectiveConfigOptionLoader:173 - Loaded and initialized config classes: 9 OK out of 12 attempts in PT0.018S

15:28:23,171  INFO Reflections:224 - Reflections took 38 ms to scan 1 urls, producing 12 keys and 25 values 

15:28:23,244  INFO CassandraThriftStoreManager:628 - Closed Thrift connection pooler.

15:28:23,251  INFO GraphDatabaseConfiguration:1563 - Generated unique-instance-id=0a96cb391964-MacBook-Pro-3-local1

15:28:23,263  INFO Backend:463 - Configuring index [search]

15:28:23,355  INFO plugins:151 - [Solarr] loaded [], sites []

15:28:23,875  INFO ElasticSearchIndex:368 - Configured remote host: 127.0.0.1 : 9300

15:28:24,043  INFO Backend:178 - Initiated backend operations thread pool of size 8

15:28:24,165  INFO KCVSLog:744 - Loaded unidentified ReadMarker start time 2017-09-13T09:58:24.152Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller@7fcff1b9

15:28:25,409  INFO CassandraThriftStoreManager:628 - Closed Thrift connection pooler.


How i can enable logging to see the internals and queries fired against JanusGraph.

~AnkurG
 

HadoopMarc

unread,
Sep 13, 2017, 2:53:05 PM9/13/17
to JanusGraph users
Hi Ankur,

Gremlin-server 3.3.0 has an audit log feature based on the authentication.enableAuditLog property, so you can expect this in one of the next Janusgraph  releases. I did not look into logging features of JanusGraph itself.

HTH,    Marc

Op woensdag 13 september 2017 12:09:10 UTC+2 schreef Ankur Goel:

Jason Plurad

unread,
Sep 13, 2017, 3:01:20 PM9/13/17
to JanusGraph users
Take a look at your classpath loading order to make sure that logback is getting selected as the binding for SLF4J.
If a different logger is getting picked up before it, like log4j12, then it won't matter what configuration you have in your logback.xml.
See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

Ankur Goel

unread,
Sep 15, 2017, 3:55:06 AM9/15/17
to JanusGraph users
Thnx Got the problem resolved:

As per SLF4j:
Embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding but only depend on slf4j-api. When a library declares a compile-time dependency on a SLF4J binding, it imposes that binding on the end-user, thus negating SLF4J's purpose. When you come across an embedded component declaring a compile-time dependency on any SLF4J binding, please take the time to contact the authors of said component/library and kindly ask them to mend their ways.

Request to exclude following dependency 


<groupId>org.slf4j</groupId>

<artifactId>slf4j-log4j12</artifactId>


from JanusGraph.


<groupId>org.janusgraph</groupId>

<artifactId>janusgraph-es</artifactId>

<artifactId>janusgraph-cassandra</artifactId>

<artifactId>gremlin-driver</artifactId>


Logging will start working.


~AnkurG

Robert Dale

unread,
Sep 15, 2017, 6:58:33 AM9/15/17
to Ankur Goel, JanusGraph users
Please create an issue for review at https://github.com/JanusGraph/janusgraph/issues

Robert Dale

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/4991442b-d338-4341-a0ed-0c2fc17e2665%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages