[seam-commits] Seam SVN: r7305 - trunk/doc/reference/en/modules.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Jan 30 05:58:20 EST 2008


Author: shane.bryzak at jboss.com
Date: 2008-01-30 05:58:20 -0500 (Wed, 30 Jan 2008)
New Revision: 7305

Modified:
   trunk/doc/reference/en/modules/events.xml
Log:
JBSEAM-2071

Modified: trunk/doc/reference/en/modules/events.xml
===================================================================
--- trunk/doc/reference/en/modules/events.xml	2008-01-30 10:52:55 UTC (rev 7304)
+++ trunk/doc/reference/en/modules/events.xml	2008-01-30 10:58:20 UTC (rev 7305)
@@ -985,7 +985,45 @@
            was actually handled by an exception handler. The outermost (wrapper) exception is 
            also available, as <literal>org.jboss.seam.exception</literal>.
          </para>
+         
+         <sect3>
+             <title>Suppressing exception logging</title>
+             
+             <para>
+                 For the exception handlers defined in <literal>pages.xml</literal>, it is possible
+                 to declare the logging level at which the exception will be logged, or to even
+                 suppress the exception being logged altogether.  The attributes <literal>log</literal>
+                 and <literal>logLevel</literal> can be used to control exception logging.  By setting 
+                 <literal>log="false"</literal> as per the following example, then no log message will
+                 be generated when the specified exception occurs:
+             </para>
+             
+             <programlisting><![CDATA[    <exception class="org.jboss.seam.security.NotLoggedInException" log="false">
+        <redirect view-id="/register.xhtml">
+            <message severity="warn">You must be a member to use this feature</message>
+        </redirect>
+    </exception>]]></programlisting>
+    
+             <para>
+                 If the <literal>log</literal> attribute is not specified, then it defaults to <literal>true</literal>
+                 (i.e. the exception will be logged).  Alternatively, you can specify the <literal>logLevel</literal>
+                 to control at which log level the exception will be logged:             
+             </para>
 
+             <programlisting><![CDATA[    <exception class="org.jboss.seam.security.NotLoggedInException" logLevel="info">
+        <redirect view-id="/register.xhtml">
+            <message severity="warn">You must be a member to use this feature</message>
+        </redirect>
+    </exception>]]></programlisting>
+    
+              <para>
+                  The acceptable values for <literal>logLevel</literal> are: <literal>fatal, error, warn, info, debug</literal> 
+                  or <literal>trace</literal>.  If the <literal>logLevel</literal> is not specified, or if an invalid value is
+                  configured, then it will default to <literal>error</literal>.              
+              </para>
+         
+         </sect3>
+
         </sect2>
         
         <sect2>




More information about the seam-commits mailing list