Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/collections/CollectionAttribute.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 | 162ef5e93715 |
children | 0a5239a1e46e |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/collections/CollectionAttribute.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/collections/CollectionAttribute.java Fri Sep 05 12:58:17 2014 +0200 @@ -37,8 +37,8 @@ */ public class CollectionAttribute { - /** Privately owned logger. */ - private static final Logger logger = + /** Privately owned log. */ + private static final Logger log = Logger.getLogger(CollectionAttribute.class); protected ElementCreator ec; @@ -95,19 +95,19 @@ public void setSettings(String outputKey, Settings settings) { if (settings == null) { - logger.warn("Tried to set empty Settings for '" + outputKey + "'"); + log.warn("Tried to set empty Settings for '" + outputKey + "'"); return; } if (outputMap == null) { - logger.warn("Tried to add settings but no Outputs are existing yet."); + log.warn("Tried to add settings but no Outputs are existing yet."); return; } Output output = outputMap.get(outputKey); if (output == null) { - logger.warn("Tried to add settings for unknown Output: " + outputKey); + log.warn("Tried to add settings for unknown Output: " + outputKey); return; } @@ -117,23 +117,23 @@ public void addFacet(String outputKey, Facet facet) { if (facet == null) { - logger.warn("Tried to add null facet."); + log.warn("Tried to add null facet."); return; } if (outputMap == null) { - logger.warn("Tried to add facet but no Outputs are existing yet."); + log.warn("Tried to add facet but no Outputs are existing yet."); return; } Output output = outputMap.get(outputKey); if (output == null) { - logger.warn("Tried to add facet for unknown Output: " + outputKey); + log.warn("Tried to add facet for unknown Output: " + outputKey); return; } - logger.debug("Add facet for '" + outputKey + "': " + facet.getName()); + log.debug("Add facet for '" + outputKey + "': " + facet.getName()); output.addFacet(facet); } @@ -147,18 +147,18 @@ /** Empty facets list for outputKey output. */ public void clearFacets(String outputKey) { if (outputKey == null || outputKey.length() == 0) { - logger.warn("Tried to clear Facets, but no Output key specified!"); + log.warn("Tried to clear Facets, but no Output key specified!"); return; } if (outputMap == null) { - logger.warn("Tried to clear Facets, but no Outputs existing!"); + log.warn("Tried to clear Facets, but no Outputs existing!"); return; } Output output = outputMap.get(outputKey); if (output == null) { - logger.warn("Tried to clear Facets for unknown Out: " + outputKey); + log.warn("Tried to clear Facets for unknown Out: " + outputKey); return; } @@ -196,12 +196,12 @@ public Output getOutput(String name) { if (name == null || name.length() == 0) { - logger.warn("No Output name specified."); + log.warn("No Output name specified."); return null; } if (outputMap == null || outputMap.isEmpty()) { - logger.warn("Tried to retrieve Output, but no Outputs existing."); + log.warn("Tried to retrieve Output, but no Outputs existing."); return null; } @@ -211,19 +211,19 @@ public List<Facet> getFacets(String output) { if (output == null || output.length() == 0) { - logger.warn("No Output name specified."); + log.warn("No Output name specified."); return new ArrayList<Facet>(); } if (outputMap == null) { - logger.warn("Tried to retrieve facets, but no Outputs existing."); + log.warn("Tried to retrieve facets, but no Outputs existing."); return new ArrayList<Facet>(); } Output o = outputMap.get(output); if (o == null) { - logger.warn("No Output '" + output + "' existing."); + log.warn("No Output '" + output + "' existing."); return new ArrayList<Facet>(); } @@ -235,7 +235,7 @@ List<Facet> allFacets = new ArrayList<Facet>(); if (outputMap == null || outputMap.isEmpty()) { - logger.warn("No Outputs existing."); + log.warn("No Outputs existing."); return allFacets; } @@ -249,11 +249,11 @@ protected void appendOutputs(Element root) { if (outputMap == null || outputMap.isEmpty()) { - logger.warn("No outputs to append."); + log.warn("No outputs to append."); return; } - logger.debug("Append " + outputMap.size() + " Output Elements."); + log.debug("Append " + outputMap.size() + " Output Elements."); Element outputsEl = ec.create("outputs"); @@ -267,11 +267,11 @@ protected void appendOutput(Element root, String name, Output output) { if (name == null || name.length() == 0 || output == null) { - logger.warn("Tried to appendOutput, but Output is invalid."); + log.warn("Tried to appendOutput, but Output is invalid."); return; } - logger.debug("Append Output Element for '" + name + "'"); + log.debug("Append Output Element for '" + name + "'"); Element outputEl = ec.create("output"); ec.addAttr(outputEl, "name", name); @@ -285,7 +285,7 @@ protected void appendSettings(Element root, Settings settings) { if (settings == null) { - logger.warn("Tried to append Settings, but Settings is empty!"); + log.warn("Tried to append Settings, but Settings is empty!"); return; } @@ -295,13 +295,13 @@ protected void appendFacets(Element root, List<Facet> facets) { if (facets == null || facets.isEmpty()) { - logger.warn("Tried to append 0 Facets."); + log.warn("Tried to append 0 Facets."); return; } Document owner = root.getOwnerDocument(); - logger.debug("Append " + facets.size() + " facets."); + log.debug("Append " + facets.size() + " facets."); for (Facet facet: facets) { Node facetNode = facet.toXML(owner); @@ -315,7 +315,7 @@ protected void appendLoadedRecommendations(Element root) { if (loadedRecommendations == null) { - logger.debug("No loaded recommendations existing yet."); + log.debug("No loaded recommendations existing yet."); return; }