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

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"/>

   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" />

   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)

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

Please help


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

View raw message