Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/utils/MapUtils.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 | 5e38e2924c07 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/utils/MapUtils.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/MapUtils.java Fri Sep 05 12:58:17 2014 +0200 @@ -19,7 +19,7 @@ public class MapUtils { - private static final Logger logger = Logger.getLogger(MapUtils.class); + private static final Logger log = Logger.getLogger(MapUtils.class); public static final Pattern DB_URL_PATTERN = Pattern.compile("(.*)\\/\\/(.*):([0-9]+)\\/([\\.a-zA-Z0-9_-]+)"); @@ -41,23 +41,23 @@ String pass = SessionFactoryProvider.getPass(sf); String url = SessionFactoryProvider.getURL(sf); - logger.debug("Parse connection url: " + url); + log.debug("Parse connection url: " + url); Matcher m = DB_URL_PATTERN.matcher(url); if (!m.matches()) { - logger.warn("Could not parse Connection string." + + log.warn("Could not parse Connection string." + "Try to parse PostgreSQL string."); // maybe this is a PostgreSQL connection... return getPostgreSQLConnection(); } - logger.debug("Groups for connection string: " + m.groupCount()); + log.debug("Groups for connection string: " + m.groupCount()); int groups = m.groupCount(); - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { for (int i = 0; i <= groups; i++) { - logger.debug("Group " + i + ": " + m.group(i)); + log.debug("Group " + i + ": " + m.group(i)); } } @@ -65,7 +65,7 @@ if (RiverUtils.isUsingOracle()) { if (groups < 4) { - logger.warn("Could only partially parse connection string."); + log.warn("Could only partially parse connection string."); return null; } @@ -76,7 +76,7 @@ } else { if (groups < 4) { - logger.warn("Could only partially parse connection string."); + log.warn("Could only partially parse connection string."); return null; } @@ -118,23 +118,23 @@ Matcher m = DB_PSQL_URL_PATTERN.matcher(url); if (!m.matches()) { - logger.warn("Could not parse PostgreSQL Connection string."); + log.warn("Could not parse PostgreSQL Connection string."); return null; } int groups = m.groupCount(); - logger.debug("Groups for PostgreSQL connection string: " + groups); + log.debug("Groups for PostgreSQL connection string: " + groups); - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { for (int i = 0; i <= groups; i++) { - logger.debug("Group " + i + ": " + m.group(i)); + log.debug("Group " + i + ": " + m.group(i)); } } String connection = null; if (groups < 4) { - logger.warn("Could only partially parse connection string."); + log.warn("Could only partially parse connection string."); return null; } @@ -144,7 +144,7 @@ connection = createConnectionString(user, pass, host, db, port); - logger.debug("Created connection: '" + connection + "'"); + log.debug("Created connection: '" + connection + "'"); return connection; }