Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/states/StateFactory.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 | af13ceeba52a |
children | 0a5239a1e46e |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StateFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StateFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,8 +26,8 @@ */ public class StateFactory { - /** The logger used in this class */ - private static Logger logger = Logger.getLogger(StateFactory.class); + /** The log used in this class */ + private static Logger log = Logger.getLogger(StateFactory.class); /** The XPath to the classname of the state */ public static final String XPATH_STATE = "@state"; @@ -60,20 +60,20 @@ State state = null; try { - logger.debug("Create a new State for class: " + clazz); + log.debug("Create a new State for class: " + clazz); state = (State) Class.forName(clazz).newInstance(); state.setup(stateConf); initializeStateData(state, stateConf); } catch (InstantiationException ie) { - logger.error(ie, ie); + log.error(ie, ie); } catch (IllegalAccessException iae) { - logger.error(iae, iae); + log.error(iae, iae); } catch (ClassNotFoundException cnfe) { - logger.error(cnfe, cnfe); + log.error(cnfe, cnfe); } return state; @@ -92,14 +92,14 @@ stateConf, XPATH_DATA, XPathConstants.NODESET); if (dataList == null || dataList.getLength() == 0) { - logger.debug("The state has no input data configured."); + log.debug("The state has no input data configured."); return; } int items = dataList.getLength(); - logger.debug("The state has " + items + " data items configured."); + log.debug("The state has " + items + " data items configured."); for (int i = 0; i < items; i++) { Node data = dataList.item(i); @@ -112,17 +112,17 @@ data, XPATH_DATA_DESCRIPTION, XPathConstants.STRING); if (name == null || name.length() == 0) { - logger.warn("No name for data item at pos " + i + " found."); + log.warn("No name for data item at pos " + i + " found."); continue; } if (type == null || type.length() == 0) { - logger.warn("No type for data item at pos " + i + " found."); - logger.warn("Default type 'string' used."); + log.warn("No type for data item at pos " + i + " found."); + log.warn("Default type 'string' used."); type = "string"; } - logger.debug("add StateData '" + name + "' (type '" + type + "')"); + log.debug("add StateData '" + name + "' (type '" + type + "')"); state.addData(name, new DefaultStateData(name, desc, type)); } }