I’m using Neo4j server in my app, starting embedded graph db with REST server.
Now the neo4j-server artifact comes with logback.xml in it.
I’m also using logback for logging =>
I get
16:17:13,233 |-WARN in - Resource [logback.xml] occurs multiple times on the classpath.
16:17:13,233 |-WARN in - Resource [logback.xml] occurs at [file:/D:/dev/graph-server/target/classes/logback.xml]
16:17:13,233 |-WARN in - Resource [logback.xml] occurs at [jar:file:/C:/Users/user123/.m2/repository/org/neo4j/app/neo4j-server/1.8/neo4j-server-1.8.jar!/logback.xml]
Warning that logback.xml occurs multiple times.
What should I do? I don’t want to turn off logback status logging and it’s a bit disturbing to see this message every time I start the app.
Thanks.
Alex
P.S. – My logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<Target>System.out</Target>
<encoder>
<pattern>%d{dd/MM/yyyy HH:mm:ss } [%t] %-5p %logger{32} - %m%n</pattern>
</encoder>
</appender>
<logger name="com.myapp" level="INFO"/>
<root level="WARN">
<appender-ref ref="Console"/>
</root>
</configuration>
Fixing this is on Neo4j’s roadmap but there’s no ETA right now. As a workaround you could unpack the jar, remove
logback.xmland repack it, and then supplylogback.xmlyourself on the classpath.