logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Lipsman <b_lips...@yahoo.com>
Subject log4j extra level problem
Date Mon, 10 Jul 2006 17:44:23 GMT
Hi,

This is what I have done:
   Step1: Created MyLevelClass ( extends LEVEL ) with 2 extra levels declared
                TRACE and METHOD_DEBUG_DETAILS
   Step2: Created the wrapper around Logger ( log4j)
   Step3: Added to the log4j.xml the following 
            
  <appender name="TRACE_APP_LOG" class="org.apache.log4j.FileAppender">
            <param name="File" value="${jboss.server.log.dir}/TraceApp.log"/>
            <param name="Append" value="false"/>
           
            <layout class="org.apache.log4j.PatternLayout">
               <!-- The TRACEPCSDBLOG pattern: -->
               <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
      
            </layout>
 </appender>


   Step4: Defined the category that referencing the appender
    <category name="com.mywebapp">
           <priority value="TRACE" class="com.mywebapp.logging.MyExtraLevel" />
           <appender-ref ref="TRACE_APP_LOG" />
   </category>


   While, I start JBoss, all looks good, the trace level is beaing created(
      I used to get before error messages that 
com.mywebapp.logging.MyExtraLevel is not found. But that was fixed by adding 
jar to the lib directory.

 here is the scenario:
      MyLogger  myLogger = new MyLogger(SomeClass.class);
      // MyLogger is a wrapper around Logger ( log4j)

      myLogger.trace(); 
      // trace() is actually calling generic log() method of the log4j
      Strange thing, when I call the trace() method the message does not go 
anywhere.

Please help

Boris


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message