cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap SitemapLanguage.java
Date Thu, 06 Nov 2003 15:44:26 GMT
unico       2003/11/06 07:44:26

  Modified:    src/java/org/apache/cocoon Cocoon.java
               src/java/org/apache/cocoon/components/treeprocessor/sitemap
                        SitemapLanguage.java
  Log:
  fix bugzilla bug 24399 - sitemap logging is relative to 'sitemap' cagegory
  
  Revision  Changes    Path
  1.21      +10 -4     cocoon-2.1/src/java/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Cocoon.java	5 Nov 2003 21:01:06 -0000	1.20
  +++ Cocoon.java	6 Nov 2003 15:44:26 -0000	1.21
  @@ -59,6 +59,7 @@
   import java.util.Enumeration;
   import java.util.Map;
   
  +import org.apache.avalon.excalibur.component.ComponentProxyGenerator;
   import org.apache.avalon.excalibur.component.DefaultRoleManager;
   import org.apache.avalon.excalibur.component.ExcaliburComponentManager;
   import org.apache.avalon.excalibur.logger.LoggerManager;
  @@ -323,13 +324,18 @@
           } catch (Exception e) {
               throw new ConfigurationException("Could not load parser " + parser, e);
           }
  -
  +        
           ContainerUtil.initialize(startupManager);
  -
  +        
           this.configure(startupManager);
  -
  +        
           ContainerUtil.dispose(startupManager);
           startupManager = null;
  +
  +        // add the logger manager to the component locator
  +        final ComponentProxyGenerator proxyGenerator = new ComponentProxyGenerator();
  +        final Component loggerManagerProxy = proxyGenerator.getProxy(LoggerManager.class.getName(),loggerManager);
  +        componentManager.addComponentInstance(LoggerManager.ROLE,loggerManagerProxy);
   
           ContainerUtil.initialize(this.componentManager);
   
  
  
  
  1.8       +7 -5      cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
  
  Index: SitemapLanguage.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SitemapLanguage.java	24 Sep 2003 21:41:11 -0000	1.7
  +++ SitemapLanguage.java	6 Nov 2003 15:44:26 -0000	1.8
  @@ -59,7 +59,7 @@
   import java.util.Map;
   import java.util.Set;
   
  -import org.apache.avalon.excalibur.logger.LoggerLoggerManager;
  +import org.apache.avalon.excalibur.logger.LoggerManager;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -105,11 +105,13 @@
               }
               config = new DefaultConfiguration("", "");
           }
  -
  +        
           final CocoonComponentManager manager = new CocoonComponentManager(this.parentManager);
  -
  +        
           manager.enableLogging(getLogger());
  -        manager.setLoggerManager(new LoggerLoggerManager( getLogger()));
  +        
  +        final LoggerManager loggerManager = (LoggerManager) this.parentManager.lookup(LoggerManager.ROLE);
  +        manager.setLoggerManager(loggerManager);
   
           if (null != this.context ) {
               manager.contextualize(this.context);
  
  
  

Mime
View raw message