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:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to