[jboss-svn-commits] JBoss Portal SVN: r5201 - branches/JBoss_Portal_Branch_2_2/portlet/src/main/org/jboss/portal/portlet

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Sep 14 13:14:21 EDT 2006


Author: julien at jboss.com
Date: 2006-09-14 13:14:17 -0400 (Thu, 14 Sep 2006)
New Revision: 5201

Modified:
   branches/JBoss_Portal_Branch_2_2/portlet/src/main/org/jboss/portal/portlet/PortletContainer.java
Log:
JBPORTAL-1036 : Portlet container uses a log4j logger that use the portlet class name as category which leads to create a logger and prevent that portlet to uses its own logger factory

Modified: branches/JBoss_Portal_Branch_2_2/portlet/src/main/org/jboss/portal/portlet/PortletContainer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_2/portlet/src/main/org/jboss/portal/portlet/PortletContainer.java	2006-09-14 17:09:53 UTC (rev 5200)
+++ branches/JBoss_Portal_Branch_2_2/portlet/src/main/org/jboss/portal/portlet/PortletContainer.java	2006-09-14 17:14:17 UTC (rev 5201)
@@ -113,18 +113,14 @@
    /** Map of class adapters. */
    protected Map classAdapters;
 
-   /** Logger for portlet. */
-   protected Logger portletLog;
-
    public PortletContainer(PortletWebApp webApp, PortletMetaData metadata)
    {
       this.webApp = webApp;
       this.metadata = metadata;
       this.valve = new Valve();
-      this.log = Logger.getLogger(PortletContainer.class);
+      this.log = Logger.getLogger("org.jboss.portal.portlet.container." + metadata.getClassName().replace('.', '_'));
       this.classAdapters = new HashMap();
       this.plugins = new HashMap();
-      this.portletLog = Logger.getLogger(metadata.getClassName());
    }
 
    public String getId()
@@ -395,7 +391,7 @@
       }
       catch (RuntimeException e)
       {
-         portletLog.error("The portlet threw a runtime exception", e);
+         log.error("The portlet threw a runtime exception", e);
       }
       finally
       {
@@ -445,7 +441,7 @@
       }
       catch (Exception e)
       {
-         portletLog.error("The portlet threw an exception", e);
+         log.error("The portlet threw an exception", e);
 
          //
          if (e instanceof PortletSecurityException)




More information about the jboss-svn-commits mailing list