[jboss-cvs] JBossAS SVN: r72406 - in trunk: testsuite/src/main/org/jboss/test/jsf/webapp and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 17 20:02:32 EDT 2008


Author: stan.silvert at jboss.com
Date: 2008-04-17 20:02:32 -0400 (Thu, 17 Apr 2008)
New Revision: 72406

Modified:
   trunk/server/src/etc/conf/default/jboss-log4j.xml
   trunk/testsuite/src/main/org/jboss/test/jsf/webapp/LoggingTest.java
   trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java
   trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java
Log:
JBAS-5462


Modified: trunk/server/src/etc/conf/default/jboss-log4j.xml
===================================================================
--- trunk/server/src/etc/conf/default/jboss-log4j.xml	2008-04-17 23:55:46 UTC (rev 72405)
+++ trunk/server/src/etc/conf/default/jboss-log4j.xml	2008-04-18 00:02:32 UTC (rev 72406)
@@ -174,6 +174,11 @@
    <category name="org.apache">
       <priority value="INFO"/>
    </category>
+   
+   <!-- Limit JSF logging to DEBUG.  FINER and FINEST will not be logged -->
+   <category name="javax.enterprise.resource.webcontainer.jsf">
+     <priority value="DEBUG" />
+   </category>
 
    <!-- Limit the jacorb category to WARN as its INFO is verbose -->
    <category name="jacorb">

Modified: trunk/testsuite/src/main/org/jboss/test/jsf/webapp/LoggingTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jsf/webapp/LoggingTest.java	2008-04-17 23:55:46 UTC (rev 72405)
+++ trunk/testsuite/src/main/org/jboss/test/jsf/webapp/LoggingTest.java	2008-04-18 00:02:32 UTC (rev 72406)
@@ -59,6 +59,8 @@
    public void sendLogMessages()
    {
       java.util.logging.Logger julLogger = FacesLogger.RENDERKIT.getLogger();
+      if (julLogger.isLoggable(java.util.logging.Level.SEVERE)) 
+         throw new RuntimeException(julLogger.getName() + " should not be loggable for SEVERE.");
       julLogger.severe("Logged SEVERE message in RENDERKIT_LOGGER<br/>"); // not logged 
 
       julLogger = FacesLogger.TAGLIB.getLogger();
@@ -66,19 +68,30 @@
 
       julLogger = FacesLogger.APPLICATION.getLogger();
       julLogger.severe("Logged SEVERE message in APPLICATION_LOGGER<br/>"); // logged
+      if (julLogger.isLoggable(java.util.logging.Level.WARNING)) 
+         throw new RuntimeException(julLogger.getName() + " should not be loggable for WARNING.");
       julLogger.warning("Logged WARNING message in APPLICATION_LOGGER<br/>"); // not logged
 
       julLogger = FacesLogger.CONTEXT.getLogger();
       julLogger.warning("Logged WARNING message in CONTEXT_LOGGER<br/>"); // logged
+      if (julLogger.isLoggable(java.util.logging.Level.INFO)) 
+         throw new RuntimeException(julLogger.getName() + " should not be loggable for INFO.");
       julLogger.info("Logged INFO message in CONTEXT_LOGGER<br/>"); // not logged
 
       julLogger = FacesLogger.CONFIG.getLogger();
       julLogger.info("Logged INFO message in CONFIG_LOGGER<br/>"); // logged 
+      if (julLogger.isLoggable(java.util.logging.Level.FINE)) 
+         throw new RuntimeException(julLogger.getName() + " should not be loggable for FINE.");
       julLogger.fine("Logged FINE message in CONFIG_LOGGER<br/>"); // not logged
 
       julLogger = FacesLogger.LIFECYCLE.getLogger();
       julLogger.fine("Logged FINE message in LIFECYCLE_LOGGER<br/>"); // logged
+      if (julLogger.isLoggable(java.util.logging.Level.FINER)) 
+         throw new RuntimeException(julLogger.getName() + " should not be loggable for FINER.");
       julLogger.finer("Logged FINER message in LIFECYCLE_LOGGER<br/>"); // not logged
+      if (julLogger.isLoggable(java.util.logging.Level.FINEST)) 
+         throw new RuntimeException(julLogger.getName() + " should not be loggable for FINEST.");
+      julLogger.finest("Logged FINER message in LIFECYCLE_LOGGER<br/>"); // not logged
 
       julLogger = FacesLogger.TIMING.getLogger();
       julLogger.finer("Logged FINER message in TIMING_LOGGER<br/>"); // logged

Modified: trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java	2008-04-17 23:55:46 UTC (rev 72405)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java	2008-04-18 00:02:32 UTC (rev 72406)
@@ -120,6 +120,7 @@
       assertFalse(contains(responseBody, "Logged FINE message in CONFIG_LOGGER"));
       assertTrue(contains(responseBody, "Logged FINE message in LIFECYCLE_LOGGER"));
       assertFalse(contains(responseBody, "Logged FINER message in LIFECYCLE_LOGGER"));
+      assertFalse(contains(responseBody, "Logged FINEST message in LIFECYCLE_LOGGER"));
       assertTrue(contains(responseBody, "Logged FINER message in TIMING_LOGGER"));
       assertTrue(contains(responseBody, "Logged FINEST message in TIMING_LOGGER"));
       assertTrue(contains(responseBody, "Logged FINEST message in MANAGEDBEAN_LOGGER"));

Modified: trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java	2008-04-17 23:55:46 UTC (rev 72405)
+++ trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java	2008-04-18 00:02:32 UTC (rev 72406)
@@ -133,7 +133,7 @@
         if (log4jLogger.isEnabledFor(Level.DEBUG)) 
             julLogger.setLevel(java.util.logging.Level.FINE);
 
-        if (log4jLogger.isEnabledFor(Level.DEBUG))
+        if (log4jLogger.isEnabledFor(Level.TRACE))
             julLogger.setLevel(java.util.logging.Level.FINEST);
 
         if (log4jLogger.isEnabledFor(Level.ALL))




More information about the jboss-cvs-commits mailing list