0 Replies Latest reply on Apr 20, 2010 9:42 AM by Zufar Muhamadeev

    Jsf. Suppress stderr log.

    Zufar Muhamadeev Newbie

      Hello! I have a problem with jsf logs in gatein 3.0.0GA.

       

      I have incorrect EL expression in jsf code, or EL expression which throws an Exception. After rendering jsf in logs i see javax.portlet.PortletException: Error process faces request stacktrace twice: in ERROR [javax_portlet_faces_GenericFacesPortlet] and in ERROR [STDERR]:

       

      {noformat}15:47:12,917 ERROR [javax_portlet_faces_GenericFacesPortlet] The portlet threw an exception

      javax.portlet.PortletException: Error process faces request

              at javax.portlet.faces.GenericFacesPortlet.doFacesDispatch(GenericFacesPortlet.java:600)

              at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:486)

      ...

      15:47:12,953 ERROR [STDERR] javax.portlet.PortletException: Error process faces request

      15:47:12,953 ERROR [STDERR]     at javax.portlet.faces.GenericFacesPortlet.doFacesDispatch(GenericFacesPortlet.java:600)

      15:47:12,953 ERROR [STDERR]     at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:486)

      ...

      {noformat}

       

      Is there way to suppress stderr jsf logs?

       

      Here is jboss-log4j.xml content:

       

      {code:xml}

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

      <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">

         <appender name="FILE">
            <errorHandler/>
            <param name="File" value="${jboss.server.log.dir}/server.log"/>
            <param name="Append" value="false"/>

            <!-- Rollover at midnight each day -->
            <param name="DatePattern" value="'.'yyyy-MM-dd"/>

            <layout>
               <!-- The default pattern: Date Priority [Category] Message\n -->
               <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
            </layout>
         </appender>

         <!-- ============================== -->
         <!-- Append messages to the console -->
         <!-- ============================== -->

         <appender name="CONSOLE">
            <errorHandler/>
            <param name="Target" value="System.out"/>
            <param name="Threshold" value="INFO"/>

            <layout>
               <!-- The default pattern: Date Priority [Category] Message\n -->
               <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
            </layout>
         </appender>
        
         <!-- ================ -->
         <!-- Limit categories -->
         <!-- ================ -->

         <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
         <category name="org.apache">
            <priority value="INFO"/>
         </category>

         <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
         <category name="org.jboss.serial">
            <priority value="INFO"/>
         </category>

         <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
         <category name="org.jgroups">
            <priority value="WARN"/>
         </category>

         <!-- Limit the jacorb category to WARN as its INFO is verbose -->
         <category name="jacorb">
            <priority value="WARN"/>
         </category>

         <!-- Limit the JSR77 categories -->
         <category name="org.jboss.management">
            <priority value="INFO"/>
         </category>
        
         <!-- Limit the JSR77 categories -->
         <category name="jcr">
            <priority value="INFO"/>
         </category>

         <!-- Limit the JSR-168 and JSR-286 categories -->
         <category name="org.exoplatform.services">
            <priority value="INFO"/>
         </category>
        
         <!-- Limit the JSF -->
         <category name="javax.faces">
            <priority value="INFO"/>
         </category>

        <category name="org.ajax4jsf">
            <priority value="INFO"/>
         </category>
        
         <!-- According to JBossFacesLogging -->
         <category name="javax.enterprise.resource.webcontainer.jsf.config">
            <priority value="ALL" ></priority>
            <appender-ref ref="FILE"></appender-ref>
         </category>

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

         <!-- ======================= -->
         <!-- Setup the Root category -->
         <!-- ======================= -->

         <root>
            <priority value="INFO"/>
            <appender-ref ref="CONSOLE"/>
            <appender-ref ref="FILE"/>
         </root>
      </log4j:configuration>

      {code}