diff flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 3315:e2d355da4bd6

FLYSArtifactCollection: Lowered log level. flys-artifacts/trunk@5005 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 15 Jul 2012 16:00:55 +0000
parents b92e86a78895
children 2495b24147ff
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Fri Jul 13 19:08:58 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Sun Jul 15 16:00:55 2012 +0000
@@ -86,7 +86,7 @@
         AttributeParser parser   = new AttributeParser(oldAttrs);
 
         try {
-            String[]            aUUIDs  = getArtifactUUIDs(context);
+            String[] aUUIDs  = getArtifactUUIDs(context);
 
             oldAttrs = removeAttributes(oldAttrs, context);
             parser   = new AttributeParser(oldAttrs);
@@ -100,13 +100,10 @@
 
             helper.setAttribute(newAttr);
 
-            // Make it an empty array if null.
-            if (aUUIDs == null) {
-                aUUIDs = new String[] {};
-            }
-
-            for (String uuid: aUUIDs) {
-                helper.addArtifact(uuid);
+            if (aUUIDs != null) {
+                for (String uuid: aUUIDs) {
+                    helper.addArtifact(uuid);
+                }
             }
         }
         catch (ArtifactDatabaseException ade) {
@@ -334,9 +331,13 @@
         CallContext  context)
     throws IOException
     {
+        boolean debug = log.isDebugEnabled();
+
         long reqBegin = System.currentTimeMillis();
 
-        log.info("FLYSArtifactCollection.out");
+        if (debug) {
+            log.debug("FLYSArtifactCollection.out");
+        }
 
         String name = XMLUtils.xpathString(
             format, XPATH_OUT_NAME, ArtifactNamespaceContext.INSTANCE);
@@ -344,9 +345,11 @@
         String subtype = XMLUtils.xpathString(
             format, XPATH_OUT_TYPE, ArtifactNamespaceContext.INSTANCE);
 
-        log.info("-> Output name = " + name);
-        log.info("-> Output type = " + type);
-        log.info("-> Output subtype = " + subtype);
+        if (debug) {
+            log.debug("-> Output name = " + name);
+            log.debug("-> Output type = " + type);
+            log.debug("-> Output subtype = " + subtype);
+        }
 
         OutGenerator generator = null;
         if (type != null

http://dive4elements.wald.intevation.org