[jboss-user] [Beginner's Corner] New message: "Log4j and JBoss 4.2.3 not creating file."
Seamus Loftus
do-not-reply at jboss.com
Tue Feb 16 13:50:17 EST 2010
User development,
A new message was posted in the thread "Log4j and JBoss 4.2.3 not creating file.":
http://community.jboss.org/message/526617#526617
Author : Seamus Loftus
Profile : http://community.jboss.org/people/Jadin
Message:
--------------------------------------------------------------
I am having some trouble with Log4J on JBoss 4.2.3 AS. I know that JBoss has it's own log4j setup, but I am trying to keep my application independent from the rest of the project. I set up class loading isolation as follows:
{code}
<
jboss-web>
<loader-repository>
net.sourceforge.gateway:loader=GatewayLoader
<loader-repository-config>
java2ParentDelegation=false
</loader-repository-config>
</loader-repository></
jboss-web>
{code}
and here is my log4j file:
{code}
<?
xml version=+"1.0"+ encoding=+"UTF-8"+ ?><!
DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<
log4j:configuration xmlns:log4j=+"http://jakarta.apache.org/log4j/"+ debug=+"true"+>
<appender name=+"console"+ class=+"org.apache.log4j.ConsoleAppender"+>
<param name=+"Target"+ value=+"System.out"+ />
<layout class=+"org.apache.log4j.PatternLayout"+>
<param name=+"ConversionPattern"+ value=+"%-5p %c{1} - %m%n"+ />
</layout>
</appender>
<appender name=+"appender"+ class=+"org.apache.log4j.FileAppender"+>
<param name=+"File"+ value=+"gateway.log"+/>
<param name=+"Append"+ value=+"true"+/>
<layout class=+"org.apache.log4j.PatternLayout"+>
<param name=+"ConversionPattern"+ value=+"%d [%t] %p - %m%n"+/>
</layout>
</appender>
<root>
<appender-ref ref=+"appender"+/>
</root>
</
log4j:configuration>
{code}
My application still refuses to create the file gateway.log, but it prints out to the console. Also, the log4j jar file is in the lib folder.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/526617#526617
More information about the jboss-user
mailing list