openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r947929 [2/2] - in /openwebbeans/trunk: webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/ webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/proxy/ webbeans-impl/src/main/java/org/apache/webbeans/boot/ webbeans-i...
Date Tue, 25 May 2010 05:45:50 GMT
Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java?rev=947929&r1=947928&r2=947929&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
Tue May 25 05:45:49 2010
@@ -67,7 +67,7 @@ public class WebBeansConfigurationListen
         }
         catch (Exception e)
         {
-             logger.error("Error is occured while starting application context path : " +
event.getServletContext().getContextPath());
+             logger.error(OWBLogConst.ERROR_0018, event.getServletContext().getContextPath());
              WebBeansUtil.throwRuntimeExceptions(e);
         }
     }
@@ -86,7 +86,10 @@ public class WebBeansConfigurationListen
 	 */
     public void requestDestroyed(ServletRequestEvent event)
     {
-        logger.debug("Destroying a request : " + event.getServletRequest().getRemoteAddr());
+        if (logger.wblWillLogDebug())
+        {
+            logger.debug("Destroying a request : [{0}]", event.getServletRequest().getRemoteAddr());
+        }
         this.lifeCycle.getContextService().endContext(RequestScoped.class, event);      
 
     }
 
@@ -97,7 +100,10 @@ public class WebBeansConfigurationListen
     {
         try
         {
-            logger.debug("Starting a new request : " + event.getServletRequest().getRemoteAddr());
+            if (logger.wblWillLogDebug())
+            {
+                logger.debug("Starting a new request : [{0}]", event.getServletRequest().getRemoteAddr());
+            }
             
             this.lifeCycle.getContextService().startContext(RequestScoped.class, event);
             
@@ -123,7 +129,7 @@ public class WebBeansConfigurationListen
         }
         catch (Exception e)
         {
-            logger.error("Error is occured while starting request : " + event.getServletRequest());
+            logger.error(OWBLogConst.ERROR_0019, event.getServletRequest());
             WebBeansUtil.throwRuntimeExceptions(e);
         }
     }
@@ -135,12 +141,15 @@ public class WebBeansConfigurationListen
     {
         try
         {
-            logger.debug("Starting a session with session id : " + event.getSession().getId());
+            if (logger.wblWillLogDebug())
+            {
+                logger.debug("Starting a session with session id : [{0}]", event.getSession().getId());
+            }
             this.lifeCycle.getContextService().startContext(SessionScoped.class, event.getSession());
         }
         catch (Exception e)
         {
-            logger.error("Error is occured while starting session : " + event.getSession());
+            logger.error(OWBLogConst.ERROR_0020, event.getSession());
             WebBeansUtil.throwRuntimeExceptions(e);
         }
     }
@@ -150,7 +159,10 @@ public class WebBeansConfigurationListen
 	 */
     public void sessionDestroyed(HttpSessionEvent event)
     {
-        logger.debug("Destroying a session with session id : " + event.getSession().getId());
+        if (logger.wblWillLogDebug())
+        {
+            logger.debug("Destroying a session with session id : [{0}]", event.getSession().getId());
+        }
         this.lifeCycle.getContextService().endContext(SessionScoped.class, event.getSession());
 
         ConversationManager conversationManager = ConversationManager.getInstance();
@@ -175,4 +187,4 @@ public class WebBeansConfigurationListen
 	    //TODO Passivation
 	}
 
-}
\ No newline at end of file
+}

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java?rev=947929&r1=947928&r2=947929&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java
Tue May 25 05:45:49 2010
@@ -156,7 +156,10 @@ public final class WebContainerLifecycle
             servletContext = getServletContext(stopObject);
         }
         
-        logger.info(OWBLogConst.INFO_0003, servletContext != null ? servletContext.getContextPath()
: null);
+        if (logger.wblWillLogInfo())
+        {
+            logger.info(OWBLogConst.INFO_0002, servletContext != null ? servletContext.getContextPath()
: "null");
+        }
     }
     
     /**



Mime
View raw message