struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [35/50] [abbrv] struts git commit: Extends logging
Date Fri, 15 Jul 2016 13:19:02 GMT
Extends logging


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/e53a119c
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/e53a119c
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/e53a119c

Branch: refs/heads/master
Commit: e53a119c2cd6929883e22e8b4bcf06d6b7e46a9b
Parents: 828b237
Author: Lukasz Lenart <lukasz.lenart@gmail.com>
Authored: Wed Jan 13 17:22:36 2016 +0100
Committer: Lukasz Lenart <lukasz.lenart@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 .../struts2/tiles/StrutsFreeMarkerAttributeRenderer.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/e53a119c/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
index fbc5416..0b19b1d 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
@@ -51,7 +51,7 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
     @Override
     public void render(String path, Request request) throws IOException {
         if (path != null) {
-            LOG.trace("Rendering freemarker tile ...");
+            LOG.trace("Rendering freemarker tile [{}]", path);
 
             ActionContext ctx = readActionContext(request);
 
@@ -83,6 +83,8 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
     protected ActionContext readActionContext(Request request) {
         ActionContext ctx = null;
 
+        LOG.debug("Obtaining HttpServletRequest based on [{}]", request.getClass().getName());
+
         if (request instanceof ServletRequest) {
             HttpServletRequest httpRequest = ((ServletRequest) request).getRequest();
             ctx = ServletActionContext.getActionContext(httpRequest);
@@ -93,6 +95,7 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
         }
 
         if (ctx == null) {
+            LOG.error("Cannot obtain HttpServletRequest from [{}]", request.getClass().getName());
             throw new ConfigurationException("There is no ActionContext for current request!");
         }
 
@@ -101,6 +104,7 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
 
     @Override
     public boolean isRenderable(String path, Request request) {
+        LOG.trace("Checking if path [{}] can be rendered", path);
         return path != null && path.startsWith("/") && path.endsWith(".ftl");
     }
 


Mime
View raw message