cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java esql.xsl log.xsl util.xsl xsp.xsl
Date Wed, 21 Mar 2001 18:51:24 GMT
bloritsch    01/03/21 10:51:24

  Modified:    src/org/apache/cocoon/components/language/markup/xsp Tag:
                        xml-cocoon2 XSPGenerator.java
               src/org/apache/cocoon/components/language/markup/xsp/java
                        Tag: xml-cocoon2 esql.xsl log.xsl util.xsl xsp.xsl
  Log:
  Fixing Logging issues in XSP ServerPages
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.16  +2 -11     xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/Attic/XSPGenerator.java
  
  Index: XSPGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/Attic/XSPGenerator.java,v
  retrieving revision 1.1.2.15
  retrieving revision 1.1.2.16
  diff -u -r1.1.2.15 -r1.1.2.16
  --- XSPGenerator.java	2001/02/22 19:07:53	1.1.2.15
  +++ XSPGenerator.java	2001/03/21 18:51:04	1.1.2.16
  @@ -13,8 +13,6 @@
   
   import org.apache.cocoon.components.language.generator.CompiledComponent;
   
  -import org.apache.log.Logger;
  -import org.apache.avalon.Loggable;
   import org.apache.avalon.Poolable;
   
   import org.apache.cocoon.generation.AbstractServerPage;
  @@ -23,16 +21,9 @@
    * Base class for XSP-generated <code>ServerPagesGenerator</code> classes
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.15 $ $Date: 2001/02/22 19:07:53 $
  + * @version CVS $Revision: 1.1.2.16 $ $Date: 2001/03/21 18:51:04 $
    */
  -public abstract class XSPGenerator extends AbstractServerPage implements Loggable, CompiledComponent
{
  -  protected Logger log;
  -
  -    public void setLogger(Logger logger) {
  -        if (this.log == null) {
  -            this.log = logger;
  -        }
  -    }
  +public abstract class XSPGenerator extends AbstractServerPage implements CompiledComponent
{
   
     /**
      * Set the current <code>ComponentManager</code> instance used by this
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.50  +3 -3      xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/esql.xsl
  
  Index: esql.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/esql.xsl,v
  retrieving revision 1.1.2.49
  retrieving revision 1.1.2.50
  diff -u -r1.1.2.49 -r1.1.2.50
  --- esql.xsl	2001/03/14 21:02:54	1.1.2.49
  +++ esql.xsl	2001/03/21 18:51:11	1.1.2.50
  @@ -1,5 +1,5 @@
   <?xml version="1.0"?>
  -<!-- $Id: esql.xsl,v 1.1.2.49 2001/03/14 21:02:54 bloritsch Exp $-->
  +<!-- $Id: esql.xsl,v 1.1.2.50 2001/03/21 18:51:11 bloritsch Exp $-->
   <!--
   
    ============================================================================
  @@ -207,7 +207,7 @@
                   try {
                     _esql_selector = (ComponentSelector) manager.lookup(Roles.DB_CONNECTION);
                   } catch (ComponentManagerException cme) {
  -                  log.error("Could not look up the datasource component", cme);
  +                  getLogger().error("Could not look up the datasource component", cme);
                   }
                 }
               }
  @@ -317,7 +317,7 @@
               _esql_connection.datasource = (DataSourceComponent) _esql_selector.select(String.valueOf(<xsl:copy-of
select="$pool"/>));
               _esql_connection.connection = _esql_connection.datasource.getConnection();
             } catch (Exception _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  -            log.error("Could not get the datasource",_esql_exception_<xsl:value-of select="generate-id(.)"/>);
  +            getLogger().error("Could not get the datasource",_esql_exception_<xsl:value-of
select="generate-id(.)"/>);
               throw new RuntimeException("Could not get the datasource "+_esql_exception_<xsl:value-of
select="generate-id(.)"/>);
             }
           </xsl:when>
  
  
  
  1.1.2.6   +14 -14    xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/log.xsl
  
  Index: log.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/log.xsl,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- log.xsl	2001/01/22 21:55:34	1.1.2.5
  +++ log.xsl	2001/03/21 18:51:13	1.1.2.6
  @@ -11,7 +11,7 @@
   
   <!--
    * @author <a href="mailto:bloritsch@apache.org>Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.5 $ $Date: 2001/01/22 21:55:34 $
  + * @version CVS $Revision: 1.1.2.6 $ $Date: 2001/03/21 18:51:13 $
   -->
   
   <!-- XSP Response logicsheet for the Java language -->
  @@ -61,14 +61,14 @@
       </xsl:variable>
   
       <xsp:logic>
  -      if (log == null) {
  +      if (getLogger() == null) {
             try {
               Category logCategory = LogKit.createCategory(<xsl:value-of select="$name"/>,
                                            LogKit.getPriorityForName(<xsl:value-of select="$level"/>));
   
  -            log = new Logger(logCategory, log);
  +            setLogger(new Logger(logCategory, log));
             } catch (Exception e) {
  -            log.error("Could not create logger for \"" +
  +            getLogger().error("Could not create logger for \"" +
                                  <xsl:value-of select="$name"/> + "\".", e);
             }
         }
  @@ -77,36 +77,36 @@
   
     <xsl:template match="log:debug">
       <xsp:logic>
  -      if(log != null)
  -        log.debug("<xsl:value-of select="."/>");
  +      if(getLogger() != null)
  +        getLogger().debug("<xsl:value-of select="."/>");
       </xsp:logic>
     </xsl:template>
   
     <xsl:template match="log:info">
       <xsp:logic>
  -      if(log != null)
  -        log.info("<xsl:value-of select="."/>");
  +      if(getLogger() != null)
  +        getLogger().info("<xsl:value-of select="."/>");
       </xsp:logic>
     </xsl:template>
   
     <xsl:template match="log:warn">
       <xsp:logic>
  -      if(log != null)
  -        log.warn("<xsl:value-of select="."/>");
  +      if(getLogger() != null)
  +        getLogger().warn("<xsl:value-of select="."/>");
       </xsp:logic>
     </xsl:template>
   
     <xsl:template match="log:error">
       <xsp:logic>
  -      if(log != null)
  -        log.error("<xsl:value-of select="."/>");
  +      if(getLogger() != null)
  +        getLogger().error("<xsl:value-of select="."/>");
       </xsp:logic>
     </xsl:template>
   
     <xsl:template match="log:fatal-error">
       <xsp:logic>
  -      if(log != null)
  -        log.fatalError("<xsl:value-of select="."/>");
  +      if(getLogger() != null)
  +        getLogger().fatalError("<xsl:value-of select="."/>");
       </xsp:logic>
     </xsl:template>
   
  
  
  
  1.1.2.7   +3 -3      xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/util.xsl
  
  Index: util.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/util.xsl,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- util.xsl	2001/03/15 13:55:24	1.1.2.6
  +++ util.xsl	2001/03/21 18:51:14	1.1.2.7
  @@ -144,7 +144,7 @@
   
                 XSPUtil.include(__is, this.contentHandler, newParser);
             } catch (Exception e) {
  -              this.log.error("Could not include page", e);
  +              getLogger().error("Could not include page", e);
             } finally {
                 this.manager.release((Component) factory);
                 this.manager.release((Component) newParser);
  @@ -184,7 +184,7 @@
   
                 XSPUtil.include(__is, this.contentHandler, newParser);
               } catch (Exception e) {
  -              this.log.error("Could not include page", e);
  +              getLogger().error("Could not include page", e);
               } finally {
                 this.manager.release((Component) newParser);
               }
  @@ -218,7 +218,7 @@
   
                 XSPUtil.include(__is, this.contentHandler, newParser);
             } catch (Exception e) {
  -              this.log.error("Could not include page", e);
  +              getLogger().error("Could not include page", e);
             } finally {
                 this.manager.release((Component) newParser);
             }
  
  
  
  1.1.2.23  +2 -2      xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/xsp.xsl
  
  Index: xsp.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/xsp.xsl,v
  retrieving revision 1.1.2.22
  retrieving revision 1.1.2.23
  diff -u -r1.1.2.22 -r1.1.2.23
  --- xsp.xsl	2001/01/22 21:55:34	1.1.2.22
  +++ xsp.xsl	2001/03/21 18:51:15	1.1.2.23
  @@ -11,7 +11,7 @@
   
   <!--
    * @author <a href="mailto:ricardo@apache.org>Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.22 $ $Date: 2001/01/22 21:55:34 $
  + * @version CVS $Revision: 1.1.2.23 $ $Date: 2001/03/21 18:51:15 $
   -->
   
   <!-- XSP Core logicsheet for the Java language -->
  @@ -44,7 +44,7 @@
   
       import org.apache.avalon.*;
       import org.apache.avalon.util.*;
  -    import org.apache.log.*;
  +
       import org.apache.cocoon.*;
       import org.apache.cocoon.generation.*;
       import org.apache.cocoon.components.parser.*;
  
  
  

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