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/java/org/apache/cocoon/xml AbstractXMLProducer.java
Date Fri, 19 Jul 2002 13:09:32 GMT
cziegeler    2002/07/19 06:09:32

  Modified:    src/java/org/apache/cocoon/transformation
                        SQLTransformer.java I18nTransformer.java
                        LDAPTransformer.java TraxTransformer.java
               src/scratchpad/src/org/apache/cocoon/transformation
                        WingsTransformer.java
               src/java/org/apache/cocoon/util TraxErrorHandler.java
               src/java/org/apache/cocoon/i18n
                        XMLResourceBundleFactory.java
                        XMLResourceBundle.java
               src/java/org/apache/cocoon/generation
                        ServerPagesGenerator.java VelocityGenerator.java
               src/java/org/apache/cocoon/serialization FOPSerializer.java
                        AbstractTextSerializer.java
               src/java/org/apache/cocoon/components/language/markup
                        LogicsheetCodeGenerator.java
               src/java/org/apache/cocoon/components/xslt
                        XSLTProcessorImpl.java
               src/java/org/apache/cocoon/xml AbstractXMLProducer.java
  Log:
  First move to LogEnabled.
  
  Revision  Changes    Path
  1.14      +2 -2      xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SQLTransformer.java	19 Jun 2002 03:21:59 -0000	1.13
  +++ SQLTransformer.java	19 Jul 2002 13:09:31 -0000	1.14
  @@ -64,7 +64,7 @@
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.util.Tokenizer;
   import org.apache.cocoon.xml.IncludeXMLConsumer;
  -import org.apache.log.Logger;
  +import org.apache.avalon.framework.logger.Logger;
   import org.xml.sax.Attributes;
   import org.xml.sax.InputSource;
   import org.xml.sax.Locator;
  
  
  
  1.21      +2 -2      xml-cocoon2/src/java/org/apache/cocoon/transformation/I18nTransformer.java
  
  Index: I18nTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/I18nTransformer.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- I18nTransformer.java	7 Jun 2002 15:06:54 -0000	1.20
  +++ I18nTransformer.java	19 Jul 2002 13:09:31 -0000	1.21
  @@ -726,7 +726,7 @@
               );
   
               // activate resource bundle logging
  -            factory.setLogger(getLogger());
  +            factory.enableLogging(getLogger());
           }
       }
   
  
  
  
  1.7       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/transformation/LDAPTransformer.java
  
  Index: LDAPTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/LDAPTransformer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- LDAPTransformer.java	22 Feb 2002 07:03:56 -0000	1.6
  +++ LDAPTransformer.java	19 Jul 2002 13:09:31 -0000	1.7
  @@ -54,7 +54,7 @@
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.xml.XMLConsumer;
  -import org.apache.log.Logger;
  +import org.apache.avalon.framework.logger.Logger;
   import org.xml.sax.Attributes;
   import org.xml.sax.Locator;
   import org.xml.sax.SAXException;
  
  
  
  1.30      +6 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
  
  Index: TraxTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- TraxTransformer.java	6 Jun 2002 13:05:13 -0000	1.29
  +++ TraxTransformer.java	19 Jul 2002 13:09:31 -0000	1.30
  @@ -63,6 +63,7 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.Loggable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
  @@ -385,8 +386,10 @@
           super.setContentHandler(transformerHandler);
           super.setLexicalHandler(transformerHandler);
   
  -        if(transformerHandler instanceof Loggable) {
  -            ((Loggable)transformerHandler).setLogger(getLogger());
  +        if (transformerHandler instanceof LogEnabled) {
  +        	((LogEnabled)transformerHandler).enableLogging(getLogger());
  +        } else if(transformerHandler instanceof Loggable) {
  +            ((Loggable)transformerHandler).setLogger(getLogkitLogger());
           }
           // According to TrAX specs, all TransformerHandlers are LexicalHandlers
           SAXResult result = new SAXResult(consumer);
  
  
  
  1.3       +1 -1      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/WingsTransformer.java
  
  Index: WingsTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/WingsTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WingsTransformer.java	15 Jul 2002 14:52:40 -0000	1.2
  +++ WingsTransformer.java	19 Jul 2002 13:09:31 -0000	1.3
  @@ -65,7 +65,7 @@
   public class WingsTransformer extends AbstractDOMTransformer {
   	protected Document transform(Document doc) {
   		WingsRenderer gr = new WingsRenderer();
  -		gr.setLogger(new org.apache.avalon.framework.logger.LogKitLogger(getLogger()));
  +		gr.setLogger(getLogger());
   		gr.setFontInfo("sansserif", 12);
   		Document svgdoc = gr.renderToSVG(doc);
   		return svgdoc;
  
  
  
  1.5       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/util/TraxErrorHandler.java
  
  Index: TraxErrorHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/util/TraxErrorHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TraxErrorHandler.java	22 Feb 2002 07:03:57 -0000	1.4
  +++ TraxErrorHandler.java	19 Jul 2002 13:09:31 -0000	1.5
  @@ -50,7 +50,7 @@
   */
   package org.apache.cocoon.util;
   
  -import org.apache.log.Logger;
  +import org.apache.avalon.framework.logger.Logger;
   
   import javax.xml.transform.ErrorListener;
   import javax.xml.transform.SourceLocator;
  
  
  
  1.8       +6 -6      xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java
  
  Index: XMLResourceBundleFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLResourceBundleFactory.java	30 May 2002 10:21:17 -0000	1.7
  +++ XMLResourceBundleFactory.java	19 Jul 2002 13:09:31 -0000	1.8
  @@ -59,9 +59,9 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.logger.Loggable;
  +import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.thread.ThreadSafe;
  -import org.apache.log.Logger;
  +import org.apache.avalon.framework.logger.Logger;
   import org.xml.sax.SAXParseException;
   
   import java.util.Collection;
  @@ -85,7 +85,7 @@
   
   public class XMLResourceBundleFactory
       extends DefaultComponentSelector
  -    implements Configurable, Composable, Loggable, Disposable, ThreadSafe
  +    implements Configurable, LogEnabled, Composable, Disposable, ThreadSafe
   {
       /** Should we load bundles to cache on startup or not? */
       protected boolean cacheAtStartup = false;
  @@ -137,7 +137,7 @@
        *
        * @param logger the logger
        */
  -    public void setLogger( final Logger logger )
  +    public void enableLogging( final Logger logger )
       {
           this.logger = logger;
       }
  @@ -345,7 +345,7 @@
               if (loc != null && !loc.getLanguage().equals(""))
                   parentBundle = (XMLResourceBundle) selectParent(name, loc);
               bundle = new XMLResourceBundle();
  -            bundle.setLogger(logger);
  +            bundle.enableLogging(logger);
               bundle.compose(this.manager);
               bundle.init(name, fileName, loc, parentBundle, cacheAtStartup);
               return bundle;
  
  
  
  1.9       +5 -5      xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java
  
  Index: XMLResourceBundle.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XMLResourceBundle.java	30 May 2002 10:13:14 -0000	1.8
  +++ XMLResourceBundle.java	19 Jul 2002 13:09:31 -0000	1.9
  @@ -55,9 +55,9 @@
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.logger.Loggable;
  +import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
  -import org.apache.log.Logger;
  +import org.apache.avalon.framework.logger.Logger;
   import org.w3c.dom.Document;
   import org.w3c.dom.NamedNodeMap;
   import org.w3c.dom.Node;
  @@ -78,7 +78,7 @@
    */
   public class XMLResourceBundle
       extends ResourceBundle
  -    implements Loggable, Component, Composable, Disposable
  +    implements LogEnabled, Component, Composable, Disposable
   {
       /** DOM factory */
       protected static DocumentBuilderFactory docfactory =
  @@ -492,7 +492,7 @@
        *
        * @param logger the logger
        */
  -    public void setLogger( final Logger logger )
  +    public void enableLogging( final Logger logger )
       {
           this.logger = logger;
       }
  
  
  
  1.17      +6 -3      xml-cocoon2/src/java/org/apache/cocoon/generation/ServerPagesGenerator.java
  
  Index: ServerPagesGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/ServerPagesGenerator.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ServerPagesGenerator.java	5 Jun 2002 07:33:24 -0000	1.16
  +++ ServerPagesGenerator.java	19 Jul 2002 13:09:31 -0000	1.17
  @@ -57,6 +57,7 @@
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.Loggable;
  +import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.parameters.Parameters;
   
   import org.apache.avalon.excalibur.collections.ArrayStack;
  @@ -133,7 +134,7 @@
   
           if (autoComplete) {
               this.completionPipe = new CompletionPipe();
  -            this.completionPipe.setLogger(getLogger());
  +            this.completionPipe.setLogger(getLogkitLogger());
           }
   
           this.markupLanguage = config.getChild("markup-language").getValue(DEFAULT_MARKUP_LANGUAGE);
  @@ -217,7 +218,9 @@
   
           // Give our own logger to the generator so that logs go in the correct category
           if (generator instanceof Loggable) {
  -            ((Loggable) generator).setLogger(getLogger());
  +            ((Loggable) generator).setLogger(getLogkitLogger());
  +        } else if (generator instanceof LogEnabled) {
  +            ((LogEnabled) generator).enableLogging(getLogger());
           }
   
           generator.setup(super.resolver, super.objectModel, super.source, super.parameters);
  
  
  
  1.10      +20 -23    xml-cocoon2/src/java/org/apache/cocoon/generation/VelocityGenerator.java
  
  Index: VelocityGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/VelocityGenerator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- VelocityGenerator.java	13 Jun 2002 09:28:16 -0000	1.9
  +++ VelocityGenerator.java	19 Jul 2002 13:09:31 -0000	1.10
  @@ -550,8 +550,8 @@
        *
        * @see org.apache.velocity.runtime.log.LogSystem#init
        */
  -    public void init(RuntimeServices rs) throws Exception
  -    {
  +    public void init(RuntimeServices rs) 
  +    throws Exception {
       }
   
       /**
  @@ -559,26 +559,23 @@
        *
        * @see org.apache.velocity.runtime.log.LogSystem#logVelocityMessage
        */
  -    public void logVelocityMessage(int level, String message)
  -    {
  -        Logger logger = getLogger();
  -        switch (level)
  -    {
  -        case LogSystem.WARN_ID:
  -        logger.warn(message);
  -        break;
  -        case LogSystem.INFO_ID:
  -        logger.info(message);
  -        break;
  -        case LogSystem.DEBUG_ID:
  -        logger.debug(message);
  -        break;
  -        case LogSystem.ERROR_ID:
  -        logger.error(message);
  -        break;
  -        default:
  -        logger.info(message);
  -        break;
  +    public void logVelocityMessage(int level, String message) {
  +        switch (level) {
  +            case LogSystem.WARN_ID :
  +                getLogger().warn(message);
  +                break;
  +            case LogSystem.INFO_ID :
  +                getLogger().info(message);
  +                break;
  +            case LogSystem.DEBUG_ID :
  +                getLogger().debug(message);
  +                break;
  +            case LogSystem.ERROR_ID :
  +                getLogger().error(message);
  +                break;
  +            default :
  +                getLogger().info(message);
  +                break;
           }
       }
   }
  
  
  
  1.11      +2 -4      xml-cocoon2/src/java/org/apache/cocoon/serialization/FOPSerializer.java
  
  Index: FOPSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/FOPSerializer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FOPSerializer.java	17 Jul 2002 13:22:37 -0000	1.10
  +++ FOPSerializer.java	19 Jul 2002 13:09:32 -0000	1.11
  @@ -53,8 +53,6 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.logger.Loggable;
  -import org.apache.avalon.framework.logger.LogKitLogger;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.components.renderer.ExtendableRendererFactory;
   import org.apache.cocoon.components.renderer.RendererFactory;
  @@ -119,7 +117,7 @@
         */
       public void configure(Configuration conf)
       throws ConfigurationException {
  -        this.logger = new LogKitLogger(getLogger().getChildLogger("fop"));
  +        this.logger = getLogger().getChildLogger("fop");
           MessageHandler.setScreenLogger(this.logger);
           String userConfig = null;
           java.io.File userConfigFile = null;
  
  
  
  1.12      +2 -2      xml-cocoon2/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
  
  Index: AbstractTextSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractTextSerializer.java	1 Jul 2002 14:43:17 -0000	1.11
  +++ AbstractTextSerializer.java	19 Jul 2002 13:09:32 -0000	1.12
  @@ -255,7 +255,7 @@
               if (needsNamespacesAsAttributes()) {
                   // Setup a correction pipe
                   this.namespacePipe = new NamespaceAsAttributes();
  -                this.namespacePipe.setLogger(getLogger());
  +                this.namespacePipe.enableLogging(getLogger());
               }
           } catch(Exception e) {
               getLogger().warn("Cannot know if transformer needs namespaces attributes -
assuming NO.", e);
  
  
  
  1.13      +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/LogicsheetCodeGenerator.java
  
  Index: LogicsheetCodeGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/LogicsheetCodeGenerator.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- LogicsheetCodeGenerator.java	20 Apr 2002 03:38:34 -0000	1.12
  +++ LogicsheetCodeGenerator.java	19 Jul 2002 13:09:32 -0000	1.13
  @@ -50,7 +50,7 @@
   */
   package org.apache.cocoon.components.language.markup;
   
  -import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.avalon.excalibur.component.AbstractDualLogEnabled;
   
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.util.TraxErrorHandler;
  @@ -77,7 +77,7 @@
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @version CVS $Id$
    */
  -public class LogicsheetCodeGenerator extends AbstractLoggable implements MarkupCodeGenerator
{
  +public class LogicsheetCodeGenerator extends AbstractDualLogEnabled implements MarkupCodeGenerator
{
   
       private ContentHandler serializerContentHandler;
   
  
  
  
  1.24      +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java
  
  Index: XSLTProcessorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- XSLTProcessorImpl.java	6 May 2002 12:28:51 -0000	1.23
  +++ XSLTProcessorImpl.java	19 Jul 2002 13:09:32 -0000	1.24
  @@ -50,11 +50,11 @@
   */
   package org.apache.cocoon.components.xslt;
   
  +import org.apache.avalon.excalibur.component.AbstractDualLogEnabled;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.parameters.Parameterizable;
   import org.apache.avalon.framework.parameters.ParameterException;
  @@ -120,7 +120,7 @@
    * @since   July 11, 2001
    */
   public class XSLTProcessorImpl
  -  extends AbstractLoggable
  +  extends AbstractDualLogEnabled
     implements XSLTProcessor,
                Composable,
                Disposable,
  
  
  
  1.6       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/xml/AbstractXMLProducer.java
  
  Index: AbstractXMLProducer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/xml/AbstractXMLProducer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractXMLProducer.java	22 Feb 2002 07:03:58 -0000	1.5
  +++ AbstractXMLProducer.java	19 Jul 2002 13:09:32 -0000	1.6
  @@ -51,7 +51,7 @@
   package org.apache.cocoon.xml;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.avalon.excalibur.component.AbstractDualLogEnabled;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.ext.LexicalHandler;
   
  @@ -64,7 +64,7 @@
    * @version CVS $Id$
    */
   public abstract class AbstractXMLProducer
  -extends AbstractLoggable
  +extends AbstractDualLogEnabled
   implements XMLProducer, Recyclable {
   
       /** The <code>XMLConsumer</code> receiving SAX events. */
  
  
  

----------------------------------------------------------------------
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