Reputation: 44114
I'm developing a web application using Logback as logging framework, and am testing it in Tomcat 6. For some reason, logback.xml does not get read.
LoggerFactory.getLogger(...)
returns logback logger instances.Any idea what's going on?
Update: It appears something deeper is going on. These return null
:
// in a servlet
getClass().getClassLoader().getResource("/logback.xml");
getClass().getClassLoader().getResource("MyServlet.class");
When I log the classloader, everything appears fine:
22:32:11.221 [http-8080-1] INFO test.MyServlet - WebappClassLoader
context: /test
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@630f41e9
Upvotes: 1
Views: 1506
Reputation: 44114
It was a Linux permission thing. Some directory lacked read/execute permissions. I accidentally fixed it when I ran into more problems with that.
Upvotes: 1