This content has been marked as final.
Show 4 replies
-
1. Re: Implementing my own log4j.xml on jboss-4.0.3SP1
peterj Jul 20, 2006 4:14 PM (in response to heather)Try this one change:
String log4jFile = "log4j.xml";
The web application class loader looks in WEB-INF/classes automatically so you don't have to specify that. -
2. Re: Implementing my own log4j.xml on jboss-4.0.3SP1
jaikiran Jul 21, 2006 2:14 AM (in response to heather)String log4jFile = "/WEB-INF/classes/log4j.xml";
Change this to:String log4jFile = "WEB-INF/classes/log4j.xml";
Note that there is no '/' before the WEB-INF. Try it out and see if it works.
Alternately, you can try:InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("WEB-INF/classes/log4j.xml");
Do I need to change other settings to use my own log4j.xml?
See if this helps:
http://wiki.jboss.org/wiki/Wiki.jsp?page=Log4jRepositorySelector -
3. Re: Implementing my own log4j.xml on jboss-4.0.3SP1
heather Jul 21, 2006 5:21 AM (in response to heather)I changed it to "log4j.xml" and it still cannot find it with java.util.zip.ZipException as it cannot find path.
Think I need to step back and look at my set-up to get my head round this. -
4. Re: Implementing my own log4j.xml on jboss-4.0.3SP1
heather Jul 21, 2006 6:20 AM (in response to heather)The first answer was the correct one:
log4j.xml no need for WEB-INF/classes path
The other stuff was my own fault while playing around and nothing to do with problem. It now works just fine.