[jboss-user] [Installation, Configuration & DEPLOYMENT] - Log4j
div_gcet1
do-not-reply at jboss.com
Thu Feb 5 04:03:43 EST 2009
Hi
Here i m working on JBoss 4.2.2. I have a custom log4j(djboss-log4j.xml).
My problem when server configure that xml file , I have given the entry of an appender in that file and that
appender is also not created.Please help me.
djboss-log4j.xml-:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- Log4j Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <!-- $Id: jboss-log4j.xml 65459 2007-09-19 00:25:51Z dimitris at jboss.org $ -->
|
| <!--
| | For more configuration infromation and examples see the Jakarta Log4j
| | owebsite: http://jakarta.apache.org/log4j
| -->
|
| <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
|
| <!-- ================================= -->
| <!-- Preserve messages in a local file -->
| <!-- ================================= -->
|
| <!-- A time/date based rolling appender -->
| <appender name="FILE1" class="org.jboss.logging.appender.DailyRollingFileAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="File" value="${jboss.server.log.dir}/server2.log"/>
| <param name="Append" value="false"/>
|
| <!-- Rollover at midnight each day -->
| <param name="DatePattern" value="'.'yyyy-MM-dd"/>
|
| <!-- Rollover at the top of each hour
| <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
| -->
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
|
| <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
| <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
| -->
| </layout>
|
|
| </appender>
|
|
|
|
|
|
|
| <!-- ================ -->
| <!-- Limit categories -->
| <!-- ================ -->
|
| <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
| <category name="org.apache">
| <priority value="INFO"/>
| </category>
|
| <!-- Limit the jacorb category to WARN as its INFO is verbose -->
| <category name="jacorb">
| <priority value="WARN"/>
| </category>
|
| <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
| <category name="org.jgroups">
| <priority value="WARN"/>
| </category>
|
| <!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
| <category name="org.quartz">
| <priority value="INFO"/>
| </category>
|
| <!-- Limit JBoss categories -->
| <category name="org.jboss">
| <priority value="INFO"/>
| </category>
|
|
| <!-- Limit the JSR77 categories -->
| <category name="org.jboss.management">
| <priority value="INFO"/>
| </category>
|
| <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
| <category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
| <priority value="TRACE"/>
| </category>
| -->
|
| <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
| <category name="org.jboss.serial">
| <priority value="INFO"/>
| </category>
|
| <!-- Decrease the priority threshold for the org.jboss.varia category
| <category name="org.jboss.varia">
| <priority value="DEBUG"/>
| </category>
| -->
|
| <!-- Enable JBossWS message tracing
| <category name="org.jboss.ws.core.MessageTrace">
| <priority value="TRACE"/>
| </category>
| -->
|
|
|
|
|
| <
|
| <!-- ======================= -->
| <!-- Setup the Root category -->
| <!-- ======================= -->
|
| <root>
|
| <appender-ref ref="FILE1"/>
| </root>
|
| </log4j:configuration>
|
| application code for it is:-
| public static Vector<PropCoSystemDomainVO> getAllDomains(ClientInfo clientInfo)
| {
| ClassLoader classLoader = Thread.currentThread().getContextClassLoader( );
|
| URL url =classLoader.getResource("djboss-log4j.xml");
|
| System.out.println(url+" <<<<<<<<<<<<urll>>>>>>>>");
| DOMConfigurator.configure(url);
| .
| .
| .
| .
|
And consol output is:
| Propco EJB Created
| 2009-02-05 14:26:38,031 INFO [STDOUT] jar:file:/C:/jboss1/server/default/tmp/deploy/tmp7512propcooffice-ejb.jar!/djboss-log4j.xml <<<<<<<<<<<<urll>>>>>>>>
| 2009-02-05 14:26:38,062 INFO [STDOUT] getting domains for 127.0.0.1, 192.168.5.78
| 2009-02-05 14:26:40,078 INFO [STDOUT] div4
| 2009-02-05 14:26:40,078 INFO [STDOUT] div4
| 2009-02-05 14:26:40,078 INFO [STDOUT] div4
| 2009-02-05 14:26:40,078 INFO [STDOUT] div4
| 2009-02-05 14:26:40,078 INFO [STDOUT] Client monika (127.0.0.1, 192.168.5.78) matched with clientid local
| 2009-02-05 14:26:40,078 INFO [STDOUT] JNDI Lookup=mysql-propcosystem
| 2009-02-05 14:26:41,140 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - second pass <Thu, 5 Feb 2009 14:26:41>
| 2009-02-05 14:26:41,140 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] AtomicActionRecoveryModule: Second pass
| 2009-02-05 14:26:41,140 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TOReco
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207234#4207234
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207234
More information about the jboss-user
mailing list