You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/09/13 13:25:35 UTC

cvs commit: xml-cocoon2/src/blocks/fop/java/org/apache/cocoon/serialization FOPSerializer.java

cziegeler    2002/09/13 04:25:35

  Modified:    src/blocks/fop/java/org/apache/cocoon/serialization
                        FOPSerializer.java
  Log:
  Minor logging update
  
  Revision  Changes    Path
  1.2       +11 -8     xml-cocoon2/src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java
  
  Index: FOPSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FOPSerializer.java	28 Aug 2002 17:46:56 -0000	1.1
  +++ FOPSerializer.java	13 Sep 2002 11:25:35 -0000	1.2
  @@ -140,23 +140,28 @@
               try {
                   userConfigFile = new java.io.File(userConfig);
                   options = new Options(userConfigFile);
  -                getLogger().debug("Using config file " + userConfig);
  +                if (this.getLogger().isDebugEnabled()) {
  +                    getLogger().debug("Using config file " + userConfig);
  +                }
               } catch (Exception ex) {
  -                getLogger().error("Cannot load  config " + userConfig, ex);
                   throw new ConfigurationException("Cannot load config " + userConfig, ex);
               }
           } else {
               try {
                   options = new Options();
  -                getLogger().debug("Using default config file");
  +                if (this.getLogger().isDebugEnabled()) {
  +                    getLogger().debug("Using default config file");
  +                }
               } catch (Exception e) {
  -                getLogger().error("Cannot load default config ", e);
  +                getLogger().warn("Cannot load default config ", e);
               }
           }
   
           // Get the mime type.
           this.mimetype = conf.getAttribute("mime-type");
  -        getLogger().debug("FOPSerializer mime-type:" + mimetype);
  +        if (this.getLogger().isDebugEnabled()) {
  +            getLogger().debug("FOPSerializer mime-type:" + mimetype);
  +        }
   
           // Using the Renderer Factory, get the default renderer
           // for this MIME type.
  @@ -170,7 +175,6 @@
                   try {
                       this.renderer = (Renderer)ClassUtils.newInstance(rendererName);
                   } catch (Exception ex) {
  -                    getLogger().error("Cannot load  class " + rendererName, ex);
                       throw new ConfigurationException("Cannot load class " + rendererName, ex);
                   }
               }
  @@ -207,7 +211,6 @@
               try {
                   this.renderer = (Renderer)ClassUtils.newInstance(this.rendererName);
               } catch (Exception ex) {
  -                this.getLogger().error("Cannot load  class " + this.rendererName, ex);
                   throw new RuntimeException("Cannot load class " + this.rendererName);
               }
           }
  
  
  

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