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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to