Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java @ 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 12:58:17 +0200 |
parents | a0078e5e3b39 |
children | 5e38e2924c07 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java Fri Sep 05 12:58:17 2014 +0200 @@ -45,8 +45,8 @@ */ public class WQAdapted extends DefaultState { - /** The logger used in this state.*/ - private static Logger logger = Logger.getLogger(WQAdapted.class); + /** The log used in this state.*/ + private static Logger log = Logger.getLogger(WQAdapted.class); public static final String FIELD_WQ_MODE = "wq_isq"; @@ -95,7 +95,7 @@ String name, CallContext context) { - logger.debug("WQAdapted.createItems"); + log.debug("WQAdapted.createItems"); if (name != null && name.equals(FIELD_WQ_MODE)) { return createModeItems(cr, artifact, name, context); @@ -104,7 +104,7 @@ return createValueItems(cr, artifact, name, context); } else { - logger.warn("Unknown data object: " + name); + log.warn("Unknown data object: " + name); return null; } } @@ -117,7 +117,7 @@ String name, CallContext context) { - logger.debug("WQAdapted.createModeItems"); + log.debug("WQAdapted.createModeItems"); Element w = createItem(cr, new String[] { "w", "W" }); Element q = createItem(cr, new String[] { "q", "Q" }); @@ -133,7 +133,7 @@ String name, CallContext context) { - logger.debug("WQAdapted.createValueItems"); + log.debug("WQAdapted.createValueItems"); D4EArtifact flysArtifact = (D4EArtifact) artifact; @@ -147,7 +147,7 @@ int num = gauges != null ? gauges.size() : 0; if (num == 0) { - logger.warn("Selected distance matches no gauges."); + log.warn("Selected distance matches no gauges."); return null; } @@ -277,7 +277,7 @@ * @return the min and max Q values for the given gauge. */ protected double[] determineMinMaxQ(Gauge gauge, Wst wst) { - logger.debug("WQAdapted.determineMinMaxQ"); + log.debug("WQAdapted.determineMinMaxQ"); double[] minmaxQ = gauge != null ? wst.determineMinMaxQ(gauge.getRange()) @@ -301,7 +301,7 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQAdapted.validate"); + log.debug("WQAdapted.validate"); D4EArtifact flys = (D4EArtifact) artifact; StateData data = getData(flys, FIELD_WQ_MODE); @@ -326,7 +326,7 @@ protected boolean validateW(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQAdapted.validateW"); + log.debug("WQAdapted.validateW"); D4EArtifact flys = (D4EArtifact) artifact; RangeWithValues[] rwvs = extractInput(getData(flys, "wq_values")); @@ -356,7 +356,7 @@ protected boolean validateQ(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQAdapted.validateQ"); + log.debug("WQAdapted.validateQ"); D4EArtifact flys = (D4EArtifact) artifact; RangeWithValues[] rwvs = extractInput(getData(flys, "wq_values")); @@ -393,15 +393,15 @@ : null; if (minmax == null) { - logger.warn("Could not determine min/max Q of gauge."); + log.warn("Could not determine min/max Q of gauge."); return true; } - if (logger.isDebugEnabled()) { - logger.debug("Validate Qs with:"); - logger.debug("-- Gauge: " + gauge.getName()); - logger.debug("-- Gauge min: " + minmax[0]); - logger.debug("-- Gauge max: " + minmax[1]); + if (log.isDebugEnabled()) { + log.debug("Validate Qs with:"); + log.debug("-- Gauge: " + gauge.getName()); + log.debug("-- Gauge min: " + minmax[0]); + log.debug("-- Gauge max: " + minmax[1]); } for (double q: qs) { @@ -423,15 +423,15 @@ : null; if (minmax == null) { - logger.warn("Could not determine min/max W of gauge."); + log.warn("Could not determine min/max W of gauge."); return true; } - if (logger.isDebugEnabled()) { - logger.debug("Validate Ws with:"); - logger.debug("-- Gauge: " + gauge.getName()); - logger.debug("-- Gauge min: " + minmax[0]); - logger.debug("-- Gauge max: " + minmax[1]); + if (log.isDebugEnabled()) { + log.debug("Validate Ws with:"); + log.debug("-- Gauge: " + gauge.getName()); + log.debug("-- Gauge min: " + minmax[0]); + log.debug("-- Gauge max: " + minmax[1]); } for (double w: ws) { @@ -471,7 +471,7 @@ res[i] = Double.parseDouble(values[i]); } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); } }