Reputation: 87
So I've been developing a GraphAware Runtime module to extend Neo4J functionality. According to GraphAware, in order to enable logging I need to add a slf4j provided dependency to my module and add an entry to custom-logback.xml file.
That unfortunately doesn't seem to work. Specifying custom log levels doesn't seem to affect what is being printed in the console, and adding a new appender (file) doesn't seem to take any effect, i.e. no files are created.
Did anyone have a go at adding logs to graphaware runtime modules? Also, how would one debug such a module, if you have to deploy it to neo4j, and it's being run by the neo4j itself?
UPDATE 1:
So I'm using Neo4J 2.3.2 and the custom-logback.xml file didn't exist orignally in the package, and I had to create it. I just checked and downloaded 2.2.8 version, and that file seems to exist in that package. Did anything change in the 2.3 version of Neo4J in terms of logging?
Upvotes: 1
Views: 221
Reputation: 2661
Turns out adding a logback.xml
file to your conf
directory with contents along these lines seems to work perfectly. I'll update the docs, please let me know if that worked. Cheers!
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSSZ} %-5level %msg%n</pattern>
</encoder>
</appender>
<logger name="com.graphaware" level="INFO"/>
<root level="DEBUG">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
Upvotes: 1