[Dive4elements-commits] [PATCH 1 of 6] Improve loggin in FLYSArtifact

Wald Commits scm-commit at wald.intevation.org
Wed Nov 14 11:25:41 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1352887806 -3600
# Node ID c095eb67c9758b7e19dc5bbf2863973cc6a5bde4
# Parent  334c68344eb5124be529d5668e7bef45096ca894
Improve loggin in FLYSArtifact

diff -r 334c68344eb5 -r c095eb67c975 flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Wed Nov 14 11:20:06 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Wed Nov 14 11:10:06 2012 +0100
@@ -930,6 +930,8 @@
         }
 
         log.warn("Could not find facet: " + name + " at " + index);
+        log.warn("Available facets for : " + getName() + " " + identifier() +
+                ": " + facets.values());
         return null;
     }
 
@@ -1229,6 +1231,9 @@
             }
             return new ArrayList<Output>();
         }
+        if (debug) {
+            log.debug("State '" + stateId + "' has facets " + fs);
+        }
 
         List<Output> gen = generateOutputs(list, fs);
 
@@ -1249,10 +1254,13 @@
      */
     protected List<Output> generateOutputs(List<Output> list, List<Facet> fs) {
         List<Output> generated = new ArrayList<Output>();
+        log.debug("generateOutputs for Artifact " + getName() + " "
+                + identifier());
 
         boolean debug = log.isDebugEnabled();
 
         for (Output out: list) {
+            log.debug("check facets for output: " + out.getName());
             Output o = new DefaultOutput(
                 out.getName(),
                 out.getDescription(),
@@ -1439,6 +1447,9 @@
     protected void dumpArtifact() {
         log.debug("++++++++++++++ DUMP ARTIFACT DATA +++++++++++++++++");
         // Include uuid, type, name
+        log.debug(" - Name: " + getName());
+        log.debug(" - UUID: " + identifier());
+        log.debug(" - Class: " + this.getClass().getName());
 
         log.debug("------ DUMP DATA ------");
         Collection<StateData> allData = data.values();


More information about the Dive4elements-commits mailing list