[PATCH] Reduce misspelled, superfluous logging

Wald Commits scm-commit at wald.intevation.org
Thu Sep 25 12:22:16 CEST 2014


# HG changeset patch
# User "Tom Gottfried <tom at intevation.de>"
# Date 1411640507 -7200
# Node ID 02782ed6c8de804455b7eabf77ae6df45a18d55e
# Parent  d6c03537970eda15c546a810d284cdd80f781499
Reduce misspelled, superfluous logging.

diff -r d6c03537970e -r 02782ed6c8de artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java
--- a/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java	Thu Sep 25 11:00:31 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java	Thu Sep 25 12:21:47 2014 +0200
@@ -142,13 +142,6 @@
     ) {
         List<String> compatFacets = this.compatibilities.get(outputName);
 
-        if (log.isDebugEnabled() && compatFacets != null) {
-            log.debug("Compabitle Facets:");
-            for (String compatible: compatFacets) {
-                log.debug(   "- " + compatible);
-            }
-        }
-
         try {
             writeFacets(outputName, newOutFacets, oldOutFacets, compatFacets);
         }
@@ -191,16 +184,12 @@
         for (Facet fac: newFacets) {
             ManagedFacet facet = (ManagedFacet) fac;
 
-            if (debug) {
-                log.debug("Try to add Facet: " + facet.getName());
-            }
-
             String bondage = facet.getBoundToOut();
             if (bondage != null && bondage.equals(outputName)) {
                 log.debug("Adding bound facet regardless of compatibility: " +
                     facet.getName());
             } else if (!compatibleFacets.contains(facet.getName())) {
-                log.debug("Have incompatible facet, skip: " + facet.getName());
+                log.debug("Skip incompatible facet " + facet.getName());
                 continue;
             } else if (facet.getBoundToOut() != null &&
                     !facet.getBoundToOut().equals(outputName)) {
@@ -208,8 +197,8 @@
                         " because it is bound to: " + facet.getBoundToOut());
                 continue;
             } else {
-                log.debug("Facet is bound to: " + facet.getBoundToOut());
-                log.debug("Have compatible facet: " + facet.getName());
+                log.debug("Compatible facet " + facet.getName() +
+                    " is bound to: " + facet.getBoundToOut());
             }
 
             ManagedFacet picked = pickFacet(facet, oldFacets);


More information about the Dive4Elements-commits mailing list