jefft       2003/03/12 06:30:59

  Modified:    src/java/org/apache/cocoon/components/modules/input
                        AbstractMetaModule.java
  Log:
  More meaningful debug log
  
  Revision  Changes    Path
  1.2       +12 -5     
cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java
  
  Index: AbstractMetaModule.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractMetaModule.java   9 Mar 2003 00:09:02 -0000       1.1
  +++ AbstractMetaModule.java   12 Mar 2003 14:30:59 -0000      1.2
  @@ -101,6 +101,7 @@
       private final static int OP_GET = 0;
       private final static int OP_VALUES = 1;
       private final static int OP_NAMES = 2;
  +    private final static String[] OPNAME = new String[] {"GET_VALUE", "GET_VALUES", 
"GET_NAMES"};
   
   
       /**
  @@ -304,21 +305,29 @@
   
           try {
   
  -            if (getLogger().isDebugEnabled())
  -                getLogger().debug("parameters "+op+": "+modA+", "+modAName+", 
"+modAConf+" || "+modB+", "+modBName+", "+modBConf);
               if (cs == null)
                   cs = (ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
   
  +            boolean useDynamic;
               if (modB == null && modBName == null) {
  +                useDynamic = false;
                   input = modA;
                   name = modAName;
                   conf = modAConf;
               } else {
  +                useDynamic = true;
                   input = modB;
                   name = modBName;
                   conf = modBConf;
               }
           
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("MetaModule performing op "+OPNAME[op]+" on " + 
  +                        (useDynamic?"dynamically":"statically") + " " +
  +                        (input==null?"created":"assigned") +
  +                        " module '"+name+"', using config "+modBConf);
  +            }
  +
               if (input == null) {
                   if (cs.hasComponent(name)) {
                       release = true;
  @@ -358,6 +367,4 @@
           return value;
       }
                                 
  -
  -
   }
  
  
  

Reply via email to