Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.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 | 1ccbd7f81c7d |
children | 9667900536b6 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -62,8 +62,8 @@ */ public class RiverContextFactory implements ArtifactContextFactory { - /** The logger that is used in this class. */ - private static Logger logger = Logger.getLogger(RiverContextFactory.class); + /** The log that is used in this class. */ + private static Logger log = Logger.getLogger(RiverContextFactory.class); /** The XPath to the artifacts configured in the configuration. */ public static final String XPATH_ARTIFACTS = @@ -207,7 +207,7 @@ TransitionEngine engine = new TransitionEngine(); List<Document> artifacts = getArtifactConfigurations(config); - logger.info("Found " + artifacts.size() + " artifacts in the config."); + log.info("Found " + artifacts.size() + " artifacts in the config."); for (Document doc: artifacts) { @@ -218,14 +218,14 @@ doc, XPATH_TRANSITIONS, XPathConstants.NODESET); if (list == null) { - logger.warn("The artifact " + artName + + log.warn("The artifact " + artName + " has no transitions configured."); continue; } int trans = list.getLength(); - logger.info( + log.info( "Artifact '" + artName + "' has " + trans + " transitions."); for (int i = 0; i < trans; i++) { @@ -264,7 +264,7 @@ File file = new File(xlink); if (!file.isFile() || !file.canRead()) { - logger.warn("Artifact configuration '" + file + "' not found."); + log.warn("Artifact configuration '" + file + "' not found."); continue; } @@ -287,7 +287,7 @@ StateEngine engine = new StateEngine(); List<Document> artifacts = getArtifactConfigurations(config); - logger.info("Found " + artifacts.size() + " artifacts in the config."); + log.info("Found " + artifacts.size() + " artifacts in the config."); for (Document doc: artifacts) { List<State> states = new ArrayList<State>(); @@ -299,14 +299,14 @@ doc, XPATH_STATES, XPathConstants.NODESET); if (stateList == null) { - logger.warn("The artifact " + artName + + log.warn("The artifact " + artName + " has no states configured."); continue; } int count = stateList.getLength(); - logger.info( + log.info( "Artifact '" + artName + "' has " + count + " states."); for (int i = 0; i < count; i++) { @@ -337,11 +337,11 @@ int num = outGenerators == null ? 0 : outGenerators.getLength(); if (num == 0) { - logger.warn("No output generators configured in this application."); + log.warn("No output generators configured in this application."); return; } - logger.info("Found " + num + " configured output generators."); + log.info("Found " + num + " configured output generators."); GeneratorLookup generators = new GeneratorLookup(); @@ -364,7 +364,7 @@ generatorClass = (Class<OutGenerator>)Class.forName(clazz); } catch (ClassNotFoundException cnfe) { - logger.error(cnfe, cnfe); + log.error(cnfe, cnfe); continue; } @@ -378,13 +378,13 @@ cfg = ec.convert(item); } catch (ClassNotFoundException cnfe) { - logger.error(cnfe, cnfe); + log.error(cnfe, cnfe); } catch (InstantiationException ie) { - logger.error(ie); + log.error(ie); } catch (IllegalAccessException iae) { - logger.error(iae); + log.error(iae); } } @@ -396,7 +396,7 @@ } } - logger.info("Successfully loaded " + idx + " output generators."); + log.info("Successfully loaded " + idx + " output generators."); context.put(RiverContext.OUTGENERATORS_KEY, generators); context.put(RiverContext.FACETFILTER_KEY, generators); } @@ -410,7 +410,7 @@ * @param context The RiverContext. */ protected void configureThemes(Document config, RiverContext context) { - logger.debug("RiverContextFactory.configureThemes"); + log.debug("RiverContextFactory.configureThemes"); Document cfg = getThemeConfig(config); @@ -420,10 +420,10 @@ int groupNum = themeGroups != null ? themeGroups.getLength() : 0; if (groupNum == 0) { - logger.warn("There are no theme groups configured!"); + log.warn("There are no theme groups configured!"); } - logger.info("Found " + groupNum + " theme groups in configuration"); + log.info("Found " + groupNum + " theme groups in configuration"); List<ThemeGroup> groups = new ArrayList<ThemeGroup>(); @@ -435,11 +435,11 @@ int num = themes != null ? themes.getLength() : 0; if (num == 0) { - logger.warn("There are no themes configured!"); + log.warn("There are no themes configured!"); return; } - logger.info("Theme group has " + num + " themes."); + log.info("Theme group has " + num + " themes."); Map<String, Theme> theThemes = new HashMap<String, Theme>(); @@ -455,7 +455,7 @@ String gName = themeGroup.getAttribute("name"); groups.add(new ThemeGroup(gName, theThemes)); - logger.info( + log.info( "Initialized " + theThemes.size() + "/" + num + " themes " + "of theme-group '" + gName + "'"); } @@ -477,14 +477,14 @@ themeConfig = Config.replaceConfigDir(themeConfig); - logger.debug("Parse theme cfg: " + themeConfig); + log.debug("Parse theme cfg: " + themeConfig); return XMLUtils.parseDocument(new File(themeConfig)); } protected void configureThemesMappings(Document cfg, RiverContext context) { - logger.debug("RiverContextFactory.configureThemesMappings"); + log.debug("RiverContextFactory.configureThemesMappings"); Document config = getThemeConfig(cfg); @@ -494,7 +494,7 @@ int num = mappings != null ? mappings.getLength() : 0; if (num == 0) { - logger.warn("No theme <--> facet mappins found!"); + log.warn("No theme <--> facet mappins found!"); return; } @@ -523,7 +523,7 @@ } } - logger.debug("Found " + mapping.size() + " theme mappings."); + log.debug("Found " + mapping.size() + " theme mappings."); context.put(RiverContext.THEME_MAPPING, mapping); } @@ -554,7 +554,7 @@ } } - logger.debug("Found " + riverWMS.size() + " river WMS."); + log.debug("Found " + riverWMS.size() + " river WMS."); context.put(RiverContext.RIVER_WMS, riverWMS); } @@ -579,7 +579,7 @@ String attrselected = e.getAttribute("selected"); boolean selected = attrselected == null ? false : attrselected.equalsIgnoreCase("true"); - logger.debug("Loaded module " + modulename); + log.debug("Loaded module " + modulename); NodeList children = e.getChildNodes(); List<String> rivers = new ArrayList<String>(children.getLength()); for (int j = 0; j < children.getLength(); j++) {