3 Replies Latest reply on Apr 2, 2010 9:45 AM by David Lloyd

    need help for log configuration

    liumin hu Master

      hi,

       

      i have a performance problem on jsf render phase. I want to tuns on the jsf lifecycle log. How can i get it?

       

      I tried this in jboss-log4j.xml, it does not work. I am using jbss as 4.2.2

       

      <category name="javax.enterprise.resource.webcontainer.jsf.lifecycle">
           <priority value="TRACE"></priority>
           <appender-ref ref="CONSOLE"></appender-ref>
      </category>
      

       

      any help is appreciated.

       

      thanks in advance.

       

      liu

        • 1. Re: need help for log configuration
          jaikiran pai Master

          liumin hu wrote:

           


          <category name="javax.enterprise.resource.webcontainer.jsf.lifecycle">
               <priority value="TRACE"></priority>
               <appender-ref ref="CONSOLE"></appender-ref>
          </category>
          

          The CONSOLE appender by default is configured to log only INFO or higher level log messages. You can either change the Threshold attribute of CONSOLE appender to TRACE (you will end up with a lot of verbose info because CONSOLE is also configured as a root appender) or use a separate file based appender like the already existing FILE appender (which points to server.log). Something like:

           

          <category name="javax.enterprise.resource.webcontainer.jsf.lifecycle">
               <priority value="TRACE"></priority>
               <appender-ref ref="FILE"></appender-ref>
          </category>
          
          
          • 2. Re: need help for log configuration
            liumin hu Master

            thanks for your quick replay,

             

             

            I created a appender

             

             

            <appender name="JSFFILE">
                  <errorHandler></errorHandler>
                  <param name="Append" value="false"/>
                  <param name="File" value="${jboss.server.home.dir}/log/JSF.log"/>
                  <layout>
                     <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
                  </layout>
            </appender>
              
            <category name="javax.faces.lifecycle">
                 <priority value="TRACE"></priority>
                 <appender-ref ref="JSFFILE"></appender-ref>
            </category>
            

             

            but nothing is logged.

             

            any suggestion?

             

            liu

            • 3. Re: need help for log configuration
              David Lloyd Master

              The problem is that JSF logs via java.util.logging, which isn't supported in AS 4.x.  You need to run 5.x or newer for AS to natively pull in java.util.logging messages.