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:13 GMT
crossley    01/12/14 21:31:13

  Modified:    src/org/apache/cocoon/components/resolver Tag:
                        cocoon_20_branch ResolverImpl.java
  Log:
  Conduct the logging efficiently, i hope.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.8   +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.2.2.7
  retrieving revision 1.2.2.8
  diff -u -r1.2.2.7 -r1.2.2.8
  --- ResolverImpl.java	2001/11/28 01:44:09	1.2.2.7
  +++ ResolverImpl.java	2001/12/15 05:31:13	1.2.2.8
  @@ -44,7 +44,7 @@
    * </resolver>
    *
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
  - * @version CVS $Revision: 1.2.2.7 $ $Date: 2001/11/28 01:44:09 $
  + * @version CVS $Revision: 1.2.2.8 $ $Date: 2001/12/15 05:31:13 $
    */
   public class ResolverImpl extends AbstractLoggable
           implements Resolver, Contextualizable, Composable, Configurable, ThreadSafe, Disposable
{
  @@ -75,18 +75,18 @@
   
           // 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);
             }
           }
   
  @@ -95,20 +95,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);
             }
           }
       }
  @@ -162,8 +168,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