[Dive4elements-commits] [PATCH 1 of 6] Removed some debug logs and changed report strings

Wald Commits scm-commit at wald.intevation.org
Thu Nov 15 17:45:46 CET 2012


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1352997396 -3600
# Node ID e357716cf3460889431f19278166b2f8d74355c0
# Parent  8e8cabaeab6a4f09fe53260123a2a9a2ec691ac0
Removed some debug logs and changed report strings.

diff -r 8e8cabaeab6a -r e357716cf346 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoadCalculation.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoadCalculation.java	Thu Nov 15 17:06:54 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoadCalculation.java	Thu Nov 15 17:36:36 2012 +0100
@@ -83,7 +83,6 @@
             List<SedimentLoadResult> results =
                 new ArrayList<SedimentLoadResult>();
             for (int i = period[0]; i <= period[1]; i++) {
-                logger.debug("calculating for year: " + i);
                 SedimentLoadResult res = calculateYear(i);
                 results.add(res);
             }
@@ -258,25 +257,24 @@
     private SedimentLoad calculateTotalLoad(SedimentLoad load, int year) {
         logger.debug("calculateTotalLoad");
         if (!load.hasCoarse()) {
-            addProblem("missing.fraction.coarse" + " " + year);
+            addProblem(year, "missing.fraction.coarse");
         }
         if (!load.hasFineMiddle()) {
-            addProblem("missing.fraction.fine_middle" + " " + year);
+            addProblem(year, "missing.fraction.fine_middle");
         }
         if (!load.hasSand()) {
-            addProblem("missing.fraction.sand" + " " + year);
+            addProblem(year, "missing.fraction.sand");
         }
         if (!load.hasSuspSand()) {
-            addProblem("missing.fraction.susp_sand" + " " + year);
+            addProblem(year, "missing.fraction.susp_sand");
         }
         if (!load.hasSuspSediment()) {
-            addProblem("missing.fraction.susp_sediment" + " " + year);
+            addProblem(year, "missing.fraction.susp_sediment");
         }
         if (hasProblems()) {
             return load;
         }
         for(double km : load.getKms()) {
-            logger.debug("total at km " + km);
             SedimentLoadFraction fraction = load.getFraction(km);
             double total = 0d;
             if ((fraction.getCoarse() <= 0d && load.hasCoarse())){
@@ -314,7 +312,6 @@
             SedimentDensityFactory.getSedimentDensity(river, kmLow, kmUp, year);
         for (double km: load.getKms()) {
             double dens = density.getDensity(km, year);
-            logger.debug("factor: " + dens);
             SedimentLoadFraction fraction = load.getFraction(km);
             double coarse = fraction.getCoarse();
             double fineMiddle = fraction.getFine_middle();
@@ -323,7 +320,6 @@
             double bedSand = fraction.getSusp_sand_bed();
             double sediment = fraction.getSusp_sediment();
             double total = fraction.getTotal();
-            logger.debug("orig: " + coarse);
             load.setCoarse(km, (coarse * dens));
             load.setFineMiddle(km, (fineMiddle * dens));
             load.setSand(km, (sand * dens));
@@ -331,7 +327,6 @@
             load.setSuspSandBed(km, (bedSand * dens));
             load.setSuspSediment(km, (sediment * dens));
             load.setTotal(km, (total * dens));
-            logger.debug("m3/a: " + load.getFraction(km).getCoarse());
         }
         return load;
     }


More information about the Dive4elements-commits mailing list