diff flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java @ 2094:22732713c54d

Made classes to merge Collection Outs more verbose for better debugging. flys-artifacts/trunk@3640 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 10 Jan 2012 11:44:46 +0000
parents ca6ccf722c24
children afc7bfb4800b
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java	Mon Jan 09 08:27:15 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java	Tue Jan 10 11:44:46 2012 +0000
@@ -94,12 +94,20 @@
             String outName = entry.getKey();
             Output a       = entry.getValue();
 
+
             Output exists = attribute.getOutput(outName);
             if (exists == null) {
                 attribute.addOutput(outName, a);
             }
 
             attribute.clearFacets(outName);
+
+            if (logger.isDebugEnabled()) {
+                logger.debug("Merge Output: " + outName);
+                logger.debug("   old Facets: " + oldFacets.size());
+                logger.debug("   new Facets: " + newFacets.size());
+            }
+
             writeOutput(a.getName(), newFacets, oldFacets);
         }
 
@@ -121,6 +129,14 @@
         List<Facet> oldOutFacets
     ) {
         List<String> compatFacets = this.compatibilities.get(outputName);
+
+        if (logger.isDebugEnabled() && compatFacets != null) {
+            logger.debug("Compabitle Facets:");
+            for (String compatible: compatFacets) {
+                logger.debug(   "- " + compatible);
+            }
+        }
+
         try {
             writeFacets(outputName, newOutFacets, oldOutFacets, compatFacets);
         }
@@ -157,6 +173,9 @@
 
         for (int i = 0; i < num; i++) {
             ManagedFacet facet = (ManagedFacet) newFacets.get(i);
+
+            logger.debug("Try to add Facet: " + facet.getName());
+
             if (!compatibleFacets.contains(facet.getName())) {
                 //logger.debug("Have incompatible facet, skip: " + facet.getName());
                 continue;

http://dive4elements.wald.intevation.org