Improved: Add the component name in " Request Begun/Done" lines in log
It's sometimes useful to know from which component a request has been sent,
eg to differentiate main requests, but not only.
*******************************************************************************/
package org.apache.ofbiz.webapp.control;
-import freemarker.template.Template;
import java.io.IOException;
import java.util.Enumeration;
-
import java.util.HashMap;
import java.util.Map;
+
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -53,6 +52,7 @@ import org.apache.ofbiz.webapp.stats.VisitHandler;
import org.apache.ofbiz.widget.renderer.VisualTheme;
import freemarker.ext.servlet.ServletContextHashModel;
+import freemarker.template.Template;
/**
* ControlServlet.java - Master servlet for the web application.
@@ -128,7 +128,7 @@ public class ControlServlet extends HttpServlet {
if (Debug.timingOn()) {
timer = new UtilTimer();
timer.setLog(true);
- timer.timerString("[" + rname + "(Domain:" + request.getScheme() + "://" + request.getServerName() + ")] Request Begun, encoding=[" + charset + "]", module);
+ timer.timerString("[" + webappName + "::" + rname + " (Domain:" + request.getScheme() + "://" + request.getServerName() + ")] Request Begun, encoding=[" + charset + "]", module);
}
// Setup the CONTROL_PATH for JSP dispatching.
@@ -341,7 +341,7 @@ public class ControlServlet extends HttpServlet {
Debug.logError(t, "Error in ControlServlet saving ServerHit/Bin information; the output was successful, but can't save this tracking information. The error was: " + t.toString(), module);
}
}
- if (Debug.timingOn()) timer.timerString("[" + rname + "(Domain:" + request.getScheme() + "://" + request.getServerName() + ")] Request Done", module);
+ if (Debug.timingOn()) timer.timerString("[" + webappName + "::" + rname + " (Domain:" + request.getScheme() + "://" + request.getServerName() + ")] Request Done", module);
// sanity check 2: make sure there are no user or session infos in the delegator, ie clear the thread
GenericDelegator.clearUserIdentifierStack();
