changeset 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 fbeed0ded014
children 2495b24147ff
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java
diffstat 2 files changed, 20 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Jul 13 19:08:58 2012 +0000
+++ b/flys-artifacts/ChangeLog	Sun Jul 15 16:00:55 2012 +0000
@@ -1,3 +1,8 @@
+2012-07-15	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
+	  Lowered log level.
+
 2012-07-13	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* doc/conf/meta-data.xml: Allow manual loading of official lines in
--- 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