This content has been marked as final.
Show 5 replies
-
1. Re: Question on log.debug
lcbdl888 Dec 15, 2008 10:09 PM (in response to valatharv)I guess that this log4j.xml is only for the test project. To set you project up, you have to have a log4j.xml in classpath of your project.
-
2. Re: Question on log.debug
valatharv Dec 15, 2008 11:26 PM (in response to valatharv)Ok I added log4j.xml it in ear as well as jar but it didn't worked
projectSeam.ear
log4j.xml
projectSeam.jar
log4j.xml
I am trying to create separate file...
a) first of all it is not creating log file "C:\\aa\\projectTest.log"
b) secondly it prints the console output as per my last post but not printing debug statement even Debug is enabled as true..
Please suggest what I am missing.....
log4j.xml
---------
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="appender" class="org.apache.log4j.RollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
<param name="File" value="C:\\aa\\projectTest.log"/>
<param name="MaxFileSize" value="10000KB"/>
<param name="MaxBackupIndex" value="2"/>
<param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<!--<param name="ConversionPattern" value="%-5p [%c{6}] %m%n"/>-->
<param name="ConversionPattern" value="%d [%t] %p - %m%n"/>
</layout>
</appender>
<appender name="debugAppender" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="C:\\aa\\projectTest.log"/>
<param name="MaxFileSize" value="10000KB"/>
<param name="MaxBackupIndex" value="2"/>
<param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %p - %m%n"/>
</layout>
</appender>
<!-- ############### Embedded JBoss AS ################# -->
<category name="org.jboss">
<priority value="ERROR"/>
</category>
<category name="com.arjuna">
<priority value="ERROR"/>
</category>
<!-- EMB-6, JMS activation throws an error due to deployment ordering, but as there is a timeout
and retry the tests pass. Hide the error message -->
<category name="jboss.resource.adapter.jms.inflow.JmsActivation">
<priority value="ERROR"/>
</category>
<!-- ############### Hibernate logging ################# -->
<category name="org.hibernate">
<priority value="ERROR"/>
</category>
<!-- ############### Seam logging ################### -->
<category name="org.jboss.seam">
<priority value="WARN"/>
</category>
<root>
<priority value="DEBUG"/>
<appender-ref ref="appender"/>
</root>
</log4j:configuration> -
3. Re: Question on log.debug
joblini Dec 16, 2008 12:59 AM (in response to valatharv)If you are running JBOSS, use C:\jboss-4.2.3.GA\server\default\conf\jboss-log4j.xml
-
4. Re: Question on log.debug
valatharv Dec 16, 2008 1:44 AM (in response to valatharv)Yes Ingo, we are using jboss-4.2.3.GA.
If I use default configuration, logs are very extensive and size grows to 3 mb when I click login.. are there any steps which can reduce / bypass some default jboss logging. -
5. Re: Question on log.debug
joblini Dec 16, 2008 3:27 AM (in response to valatharv)Hi Val, I just wanted to point out that, under JBOSS, it is not log4j.xml in your project but rather C:\jboss-4.2.3.GA\server\default\conf\jboss-log4j.xml
I suppose that if you want to reduce the volume of logging you would need to adapt your log4j configuration file to your requirements.