cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/components/resolver ResolverImpl.java
Date Sat, 15 Dec 2001 05:31:21 GMT
crossley    01/12/14 21:31:21

  Modified:    src/org/apache/cocoon/components/resolver ResolverImpl.java
  Log:
  Conduct the logging efficiently, i hope.
  
  Revision  Changes    Path
  1.11      +20 -12    xml-cocoon2/src/org/apache/cocoon/components/resolver/ResolverImpl.java
  
  Index: ResolverImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/resolver/ResolverImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ResolverImpl.java	2001/12/12 20:36:47	1.10
  +++ ResolverImpl.java	2001/12/15 05:31:21	1.11
  @@ -44,7 +44,7 @@
    * </resolver>
    *
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
  - * @version CVS $Revision: 1.10 $ $Date: 2001/12/12 20:36:47 $
  + * @version CVS $Revision: 1.11 $ $Date: 2001/12/15 05:31:21 $
    */
   public class ResolverImpl extends AbstractLoggable
           implements Resolver, Contextualizable, Composable, Parameterizable, ThreadSafe,
Disposable {
  @@ -73,18 +73,18 @@
       public void parameterize(Parameters params) throws ParameterException {
           // Over-ride the debug level that is set by CatalogManager.properties
           int debugLevel = Debug.getDebug();
  -        // getLogger().debug("Current Catalog verbosity level is "
  -        //   + debugLevel);
           String verbosity = params.getParameter("verbosity", "");
           if (verbosity != "") {
  -          getLogger().debug("Setting Catalog verbosity level to "
  -            + verbosity);
  +          if (this.getLogger().isDebugEnabled() == true) {
  +            this.getLogger().debug("Setting Catalog resolver verbosity level to "
  +              + verbosity);
  +          }
             int verbosityLevel = 0;
             try {
               verbosityLevel = Integer.parseInt(verbosity);
               Debug.setDebug(verbosityLevel);
             } catch (NumberFormatException ce1) {
  -            getLogger().warn("Trouble setting Catalog verbosity", ce1);
  +            this.getLogger().warn("Trouble setting Catalog verbosity", ce1);
             }
           }
   
  @@ -93,20 +93,26 @@
             "/resources/entities/catalog");
           try {
               String catalogFileName = this.context.getResource(catalogFile).getFile();
  -            getLogger().debug("System Catalog file name is " + catalogFileName);
  +            if (this.getLogger().isDebugEnabled() == true) {
  +              this.getLogger().debug("System OASIS Catalog file name is "
  +                + catalogFileName);
  +            }
               catalogResolver.getCatalog().parseCatalog(catalogFileName);
           } catch (Exception e) {
  -            getLogger().warn("Could not get Catalog URL", e);
  +            this.getLogger().warn("Could not get Catalog URL", e);
           }
   
           // Load a single additional local catalog
           String localCatalogFile = params.getParameter("local-catalog", "");
           if (localCatalogFile != "") {
             try {
  -            getLogger().debug("Additional Catalog is " + localCatalogFile);
  +            if (this.getLogger().isDebugEnabled() == true) {
  +              this.getLogger().debug("Additional Catalog is "
  +                + localCatalogFile);
  +            }
               catalogResolver.getCatalog().parseCatalog(localCatalogFile);
             } catch (Exception e) {
  -            getLogger().warn("Could not get local Catalog file", e);
  +            this.getLogger().warn("Could not get local Catalog file", e);
             }
           }
       }
  @@ -160,8 +166,10 @@
               throws SAXException, IOException {
         InputSource altInputSource = catalogResolver.resolveEntity(publicId,systemId);
         if (altInputSource != null) {
  -        getLogger().debug("Resolved catalog entity: " + publicId + " "
  -          + altInputSource.getSystemId());
  +        if (this.getLogger().isDebugEnabled() == true) {
  +          this.getLogger().debug("Resolved catalog entity: " + publicId + " "
  +            + altInputSource.getSystemId());
  +        }
         }
         return altInputSource;
       }
  
  
  

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