vgritsenko    2003/08/11 18:41:33

  Modified:    src/java/org/apache/cocoon/components/language/generator
                        ProgramGeneratorImpl.java
  Log:
  Do not log normal flow as ERROR
  
  Revision  Changes    Path
  1.4       +9 -5      
cocoon-2.1/src/java/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java
  
  Index: ProgramGeneratorImpl.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProgramGeneratorImpl.java 4 Aug 2003 03:20:54 -0000       1.3
  +++ ProgramGeneratorImpl.java 12 Aug 2003 01:41:33 -0000      1.4
  @@ -239,7 +239,7 @@
                                     String markupLanguageName,
                                     String programmingLanguageName,
                                     SourceResolver resolver)
  -        throws Exception {
  +            throws Exception {
   
           final String id = source.getURI();
   
  @@ -275,7 +275,9 @@
               if (programInstance == null && this.preload) {
                   // Preloading: Load program if its source/[object file] is available
                   try {
  -                    program = programmingLanguage.preload(normalizedName, 
this.workDir, markupLanguage.getEncoding());
  +                    program = programmingLanguage.preload(normalizedName,
  +                                                          this.workDir,
  +                                                          
markupLanguage.getEncoding());
   
                       this.cache.addGenerator(newManager, normalizedName, program);
                       programInstance = (CompiledComponent) 
this.cache.select(normalizedName);
  @@ -284,8 +286,10 @@
                           getLogger().debug("Successfully preloaded serverpage [" + 
id + "]");
                       }
                   } catch (Exception e) {
  -                    if (getLogger().isErrorEnabled()) {
  -                        getLogger().error("The serverpage [" + id + "] could not be 
preloaded");
  +                    if (getLogger().isInfoEnabled()) {
  +                        getLogger().info("The serverpage [" + id
  +                                         + "] could not be preloaded, will be 
re-created ("
  +                                         + e + ")");
                       }
                   }
               }
  
  
  

Reply via email to