cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/components/language/programming AbstractProgrammingLanguage.java
Date Wed, 14 Nov 2001 12:14:25 GMT
cziegeler    01/11/14 04:14:25

  Modified:    src/org/apache/cocoon/components/language/programming
                        AbstractProgrammingLanguage.java
  Log:
  CodeFormatter gets Logger
  Submitted by: Michael Homeijer [M.Homeijer@devote.nl]
  
  Revision  Changes    Path
  1.6       +7 -2      xml-cocoon2/src/org/apache/cocoon/components/language/programming/AbstractProgrammingLanguage.java
  
  Index: AbstractProgrammingLanguage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/programming/AbstractProgrammingLanguage.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractProgrammingLanguage.java	2001/10/25 19:32:58	1.5
  +++ AbstractProgrammingLanguage.java	2001/11/14 12:14:25	1.6
  @@ -11,6 +11,7 @@
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.avalon.framework.logger.Loggable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.components.language.LanguageException;
   import org.apache.cocoon.util.ClassUtils;
  @@ -23,7 +24,7 @@
    * unloading.
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.5 $ $Date: 2001/10/25 19:32:58 $
  + * @version CVS $Revision: 1.6 $ $Date: 2001/11/14 12:14:25 $
    */
   public abstract class AbstractProgrammingLanguage extends AbstractLoggable
     implements ProgrammingLanguage, Configurable
  @@ -76,7 +77,11 @@
     public CodeFormatter getCodeFormatter() {
       if (this.codeFormatter != null) {
         try {
  -        return (CodeFormatter) this.codeFormatter.newInstance();
  +        CodeFormatter formatter = (CodeFormatter) this.codeFormatter.newInstance();
  +        if (formatter instanceof Loggable) {
  +            ((Loggable)formatter).setLogger(this.getLogger());
  +        }
  +        return formatter;
         } catch (Exception e) {
             getLogger().error("Error instantiating CodeFormatter", e);
         }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message