freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [1/2] incubator-freemarker git commit: Fixed some minor oversights related to logging.
Date Fri, 20 Jan 2017 21:29:54 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/2.3-gae 000de61c7 -> 101541099


Fixed some minor oversights related to logging.


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/9e642e7b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/9e642e7b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/9e642e7b

Branch: refs/heads/2.3-gae
Commit: 9e642e7b81ba0f2c5f598b2edbf5654f76aa9395
Parents: 000de61
Author: ddekany <ddekany@apache.org>
Authored: Fri Jan 20 22:29:06 2017 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Fri Jan 20 22:29:06 2017 +0100

----------------------------------------------------------------------
 src/main/java/freemarker/cache/TemplateCache.java              | 4 +++-
 src/main/java/freemarker/ext/jsp/TaglibFactory.java            | 2 +-
 src/test/java/freemarker/test/servlet/Model2TesterServlet.java | 5 +++--
 3 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/9e642e7b/src/main/java/freemarker/cache/TemplateCache.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/cache/TemplateCache.java b/src/main/java/freemarker/cache/TemplateCache.java
index 4f62d05..469c7f9 100644
--- a/src/main/java/freemarker/cache/TemplateCache.java
+++ b/src/main/java/freemarker/cache/TemplateCache.java
@@ -701,7 +701,9 @@ public class TemplateCache {
                     storage.remove(tk);
                 }
             }
-            LOG.debug(debugName + " was removed from the cache, if it was there");
+            if (debug) {
+                LOG.debug(debugName + " was removed from the cache, if it was there");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/9e642e7b/src/main/java/freemarker/ext/jsp/TaglibFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/ext/jsp/TaglibFactory.java b/src/main/java/freemarker/ext/jsp/TaglibFactory.java
index f9ae4e6..028bb16 100644
--- a/src/main/java/freemarker/ext/jsp/TaglibFactory.java
+++ b/src/main/java/freemarker/ext/jsp/TaglibFactory.java
@@ -521,7 +521,7 @@ public class TaglibFactory implements TemplateHashModel {
                             addTldLocationsFromJarDirectoryEntryURL(url);
                         } else {
                             if (LOG.isDebugEnabled()) {
-                                LOG.warn("Can't list entries under this URL; TLD-s won't
be discovered here: "
+                                LOG.debug("Can't list entries under this URL; TLD-s won't
be discovered here: "
                                         + urlWithEF.getExternalForm());
                             }
                         }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/9e642e7b/src/test/java/freemarker/test/servlet/Model2TesterServlet.java
----------------------------------------------------------------------
diff --git a/src/test/java/freemarker/test/servlet/Model2TesterServlet.java b/src/test/java/freemarker/test/servlet/Model2TesterServlet.java
index 8b41be9..e6414a8 100644
--- a/src/test/java/freemarker/test/servlet/Model2TesterServlet.java
+++ b/src/test/java/freemarker/test/servlet/Model2TesterServlet.java
@@ -28,7 +28,8 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequestWrapper;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import freemarker.ext.servlet.FreemarkerServlet;
 import freemarker.template.utility.StringUtil;
@@ -44,7 +45,7 @@ import freemarker.template.utility.StringUtil;
  */
 public class Model2TesterServlet extends HttpServlet {
     
-    private static final Logger LOG = Logger.getLogger(Model2TesterServlet.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Model2TesterServlet.class);
     
     public static final String VIEW_PARAM_NAME = "view";
     public static final String ACTION_PARAM_NAME = "action";


Mime
View raw message