logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: logging-log4j/src/java/org/apache/joran/action NestComponentIA.java
Date Wed, 05 Jan 2005 18:27:15 GMT
ceki        2005/01/05 10:27:15

  Modified:    src/java/org/apache/joran/action NestComponentIA.java
  Log:
  Pass repository information along to sub-components.
  
  Revision  Changes    Path
  1.16      +4 -1      logging-log4j/src/java/org/apache/joran/action/NestComponentIA.java
  
  Index: NestComponentIA.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/joran/action/NestComponentIA.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- NestComponentIA.java	22 Nov 2004 17:05:13 -0000	1.15
  +++ NestComponentIA.java	5 Jan 2005 18:27:15 -0000	1.16
  @@ -22,6 +22,7 @@
   
   import org.apache.log4j.config.PropertySetter;
   import org.apache.log4j.helpers.Loader;
  +import org.apache.log4j.spi.Component;
   import org.apache.log4j.spi.ErrorItem;
   import org.apache.log4j.spi.OptionHandler;
   
  @@ -101,7 +102,9 @@
           className);
   
         actionData.nestedComponent = Loader.loadClass(className).newInstance();
  -
  +      if(actionData.nestedComponent instanceof Component) {
  +        ((Component) actionData.nestedComponent).setLoggerRepository(this.repository);
  +      }
         getLogger().debug(
           "Pushing component <{}> on top of the object stack.", localName);
         ec.pushObject(actionData.nestedComponent);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message