jefft       2003/06/19 04:19:25

  Modified:    src/java/org/apache/cocoon/transformation
                        AbstractSAXTransformer.java
  Log:
  Remove overly verbose logging of SAX element events, and remove experiment in
  making it configurable.
  
  Revision  Changes    Path
  1.4       +13 -29    
cocoon-2.1/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java
  
  Index: AbstractSAXTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractSAXTransformer.java       18 Jun 2003 12:22:06 -0000      1.3
  +++ AbstractSAXTransformer.java       19 Jun 2003 11:19:25 -0000      1.4
  @@ -201,22 +201,6 @@
       private List namespaces = new ArrayList(5);
   
       /**
  -     * Whether to log SAX events for debugging. Defaults to true, and can be
  -     * set to false by subclasses with a constructor.
  -     * */
  -    protected final boolean logSAXEvents;
  -
  -    public AbstractSAXTransformer() {
  -        this(true);
  -    }
  -
  -    /** @param logSAXEvents Whether to do a debug-level log for each processed
  -     * element. */
  -    protected AbstractSAXTransformer(final boolean logSAXEvents) {
  -        this.logSAXEvents = logSAXEvents;
  -    }
  -
  -    /**
        * Avalon Configurable Interface
        */
       public void configure(Configuration configuration)
  @@ -699,13 +683,13 @@
                                            String raw,
                                            Attributes attr)
       throws ProcessingException, IOException, SAXException {
  -        if (this.logSAXEvents && this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("BEGIN startTransformingElement uri=" + uri + ", 
name=" + name + ", raw=" + raw + ", attr=" + attr + ")");
  -        }
  +        //if (this.getLogger().isDebugEnabled()) {
  +        //    this.getLogger().debug("BEGIN startTransformingElement uri=" + uri + 
", name=" + name + ", raw=" + raw + ", attr=" + attr + ")");
  +        //}
           if (this.ignoreEventsCount == 0) super.startElement(uri, name, raw, attr);
  -        if (this.logSAXEvents && this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("END startTransformingElement");
  -        }
  +        //if (this.getLogger().isDebugEnabled()) {
  +        //    this.getLogger().debug("END startTransformingElement");
  +        //}
       }
   
       /**
  @@ -719,13 +703,13 @@
                                          String name,
                                          String raw)
       throws ProcessingException, IOException, SAXException {
  -        if (this.logSAXEvents && this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("BEGIN endTransformingElement uri=" + uri + ", 
name=" + name + ", raw=" + raw + ")");
  -        }
  +        //if (this.getLogger().isDebugEnabled()) {
  +        //    this.getLogger().debug("BEGIN endTransformingElement uri=" + uri + ", 
name=" + name + ", raw=" + raw + ")");
  +        //}
           if (this.ignoreEventsCount == 0) super.endElement(uri, name, raw);
  -        if (this.logSAXEvents && this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("END endTransformingElement");
  -        }
  +        //if (this.getLogger().isDebugEnabled()) {
  +        //    this.getLogger().debug("END endTransformingElement");
  +        //}
       }
   
       /**
  
  
  

Reply via email to