diff artifacts/src/main/java/org/dive4elements/river/utils/MapfileGenerator.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 81ae2a4873f2
children e9d912c97fa8
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/utils/MapfileGenerator.java	Fri Sep 05 12:54:58 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/MapfileGenerator.java	Fri Sep 05 12:58:17 2014 +0200
@@ -53,7 +53,7 @@
     public static final String MS_LAYER_PREFIX     = "ms_layer-";
     public static final String MS_USERSHAPE_PREFIX = "user-";
 
-    private static Logger logger = Logger.getLogger(MapfileGenerator.class);
+    private static Logger log = Logger.getLogger(MapfileGenerator.class);
 
     private File shapefileDirectory;
 
@@ -91,7 +91,7 @@
                 setupVelocity(velocityEngine);
             }
             catch (Exception e) {
-                logger.error(e, e);
+                log.error(e, e);
                 return null;
             }
         }
@@ -146,11 +146,11 @@
         }
         catch (FileNotFoundException fnfe) {
             // this is bad
-            logger.warn(fnfe, fnfe);
+            log.warn(fnfe, fnfe);
         }
         catch (IOException ioe) {
             // this is also bad
-            logger.warn(ioe, ioe);
+            log.warn(ioe, ioe);
         }
 
         return context;
@@ -171,14 +171,14 @@
         try {
             VelocityEngine engine = getVelocityEngine();
             if (engine == null) {
-                logger.error("Error while fetching VelocityEngine.");
+                log.error("Error while fetching VelocityEngine.");
                 return null;
             }
 
             return engine.getTemplate(model);
         }
         catch (Exception e) {
-            logger.warn(e, e);
+            log.warn(e, e);
         }
 
         return null;
@@ -268,7 +268,7 @@
                     layers.add(layer.getCanonicalPath());
                 }
                 catch (IOException ioe) {
-                    logger.warn(ioe, ioe);
+                    log.warn(ioe, ioe);
                 }
             }
         }
@@ -296,9 +296,9 @@
     )
     throws    FileNotFoundException
     {
-        if (logger.isDebugEnabled()) {
-            logger.debug("Write layer for:");
-            logger.debug("   directory/file: " + layerFile.getName());
+        if (log.isDebugEnabled()) {
+            log.debug("Write layer for:");
+            log.debug("   directory/file: " + layerFile.getName());
         }
 
         Writer writer = null;
@@ -312,13 +312,13 @@
             tpl.merge(context, writer);
         }
         catch (FileNotFoundException fnfe) {
-            logger.error(fnfe, fnfe);
+            log.error(fnfe, fnfe);
         }
         catch (IOException ioe) {
-            logger.error(ioe, ioe);
+            log.error(ioe, ioe);
         }
         catch (Exception e) {
-            logger.error(e, e);
+            log.error(e, e);
         }
         finally {
             try {
@@ -327,7 +327,7 @@
                 }
             }
             catch (IOException ioe) {
-                logger.debug(ioe, ioe);
+                log.debug(ioe, ioe);
             }
         }
     }
@@ -357,7 +357,7 @@
 
             Template mapTemplate = getMapfileTemplateObj();
             if (mapTemplate == null) {
-                logger.warn("No mapfile template found.");
+                log.warn("No mapfile template found.");
                 return;
             }
 
@@ -369,13 +369,13 @@
             tmp.renameTo(mapfile);
         }
         catch (FileNotFoundException fnfe) {
-            logger.error(fnfe, fnfe);
+            log.error(fnfe, fnfe);
         }
         catch (IOException ioe) {
-            logger.error(ioe, ioe);
+            log.error(ioe, ioe);
         }
         catch (Exception e) {
-            logger.error(e, e);
+            log.error(e, e);
         }
         finally {
             try {
@@ -388,7 +388,7 @@
                 }
             }
             catch (IOException ioe) {
-                logger.debug(ioe, ioe);
+                log.debug(ioe, ioe);
             }
         }
     }

http://dive4elements.wald.intevation.org