You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mr...@apache.org on 2007/10/07 15:26:19 UTC
svn commit: r582626 [2/3] - in /struts/struts2/trunk:
apps/mailreader/src/main/java/mailreader2/
apps/showcase/src/main/java/org/apache/struts2/showcase/chat/
core/src/main/java/org/apache/struts2/components/
core/src/main/java/org/apache/struts2/compo...
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletDispatcherResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletDispatcherResult.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletDispatcherResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletDispatcherResult.java Sun Oct 7 06:26:12 2007
@@ -25,11 +25,11 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -89,7 +89,7 @@
private static final long serialVersionUID = -1970659272360685627L;
- private static final Log log = LogFactory.getLog(ServletDispatcherResult.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ServletDispatcherResult.class);
public ServletDispatcherResult() {
super();
@@ -109,8 +109,8 @@
* HTTP request.
*/
public void doExecute(String finalLocation, ActionInvocation invocation) throws Exception {
- if (log.isDebugEnabled()) {
- log.debug("Forwarding to location " + finalLocation);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Forwarding to location " + finalLocation);
}
PageContext pageContext = ServletActionContext.getPageContext();
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java Sun Oct 7 06:26:12 2007
@@ -23,8 +23,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
@@ -32,6 +30,8 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -81,7 +81,7 @@
private static final long serialVersionUID = 6316947346435301270L;
- private static final Log log = LogFactory.getLog(ServletRedirectResult.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ServletRedirectResult.class);
protected boolean prependServletContext = true;
@@ -146,8 +146,8 @@
finalLocation = response.encodeRedirectURL(finalLocation);
}
- if (log.isDebugEnabled()) {
- log.debug("Redirecting to finalLocation " + finalLocation);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Redirecting to finalLocation " + finalLocation);
}
response.sendRedirect(finalLocation);
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java Sun Oct 7 06:26:12 2007
@@ -25,10 +25,9 @@
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <!-- START SNIPPET: description -->
@@ -80,7 +79,7 @@
private static final long serialVersionUID = -1468409635999059850L;
- protected static final Log log = LogFactory.getLog(StreamResult.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(StreamResult.class);
public static final String DEFAULT_PARAM = "inputName";
@@ -185,7 +184,7 @@
if (inputStream == null) {
String msg = ("Can not find a java.io.InputStream with the name [" + inputName + "] in the invocation stack. " +
"Check the <param name=\"inputName\"> tag specified for this action.");
- log.error(msg);
+ LOG.error(msg);
throw new IllegalArgumentException(msg);
}
@@ -206,7 +205,7 @@
}
}
catch(NumberFormatException e) {
- log.warn("failed to recongnize "+_contentLength+" as a number, contentLength header will not be set", e);
+ LOG.warn("failed to recongnize "+_contentLength+" as a number, contentLength header will not be set", e);
}
}
@@ -218,19 +217,19 @@
// Get the outputstream
oOutput = oResponse.getOutputStream();
- if (log.isDebugEnabled()) {
- log.debug("Streaming result [" + inputName + "] type=[" + contentType + "] length=[" + contentLength +
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Streaming result [" + inputName + "] type=[" + contentType + "] length=[" + contentLength +
"] content-disposition=[" + contentDisposition + "]");
}
// Copy input to output
- log.debug("Streaming to output buffer +++ START +++");
+ LOG.debug("Streaming to output buffer +++ START +++");
byte[] oBuff = new byte[bufferSize];
int iSize;
while (-1 != (iSize = inputStream.read(oBuff))) {
oOutput.write(oBuff, 0, iSize);
}
- log.debug("Streaming to output buffer +++ END +++");
+ LOG.debug("Streaming to output buffer +++ END +++");
// Flush
oOutput.flush();
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java Sun Oct 7 06:26:12 2007
@@ -23,13 +23,13 @@
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.StrutsStatics;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Result;
import com.opensymphony.xwork2.util.TextParseUtil;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -102,7 +102,7 @@
*/
public abstract class StrutsResultSupport implements Result, StrutsStatics {
- private static final Log _log = LogFactory.getLog(StrutsResultSupport.class);
+ private static final Logger LOG = LoggerFactory.getLogger(StrutsResultSupport.class);
/** The default parameter */
public static final String DEFAULT_PARAM = "location";
@@ -205,7 +205,7 @@
return URLEncoder.encode(parsedValue.toString(), "UTF-8");
}
catch(UnsupportedEncodingException e) {
- _log.warn("error while trying to encode ["+parsedValue+"]", e);
+ LOG.warn("error while trying to encode ["+parsedValue+"]", e);
}
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java Sun Oct 7 06:26:12 2007
@@ -30,8 +30,6 @@
import javax.servlet.jsp.JspFactory;
import javax.servlet.jsp.PageContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.JspSupportServlet;
@@ -44,6 +42,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -86,7 +86,7 @@
private static final long serialVersionUID = 7268830767762559424L;
- private static final Log log = LogFactory.getLog(VelocityResult.class);
+ private static final Logger LOG = LoggerFactory.getLogger(VelocityResult.class);
private String defaultEncoding;
private VelocityManager velocityManager;
@@ -161,7 +161,7 @@
// to do it all the time (WW-829). Since Velocity support is being deprecated, we'll oblige :)
writer.flush();
} catch (Exception e) {
- log.error("Unable to render Velocity Template, '" + finalLocation + "'", e);
+ LOG.error("Unable to render Velocity Template, '" + finalLocation + "'", e);
throw e;
} finally {
if (usedJspFactory) {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java Sun Oct 7 06:26:12 2007
@@ -25,13 +25,13 @@
import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.StrutsConstants;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <!-- START SNIPPET: description -->
@@ -84,7 +84,7 @@
*/
public class CompositeActionMapper implements ActionMapper {
- private static final Log LOG = LogFactory.getLog(CompositeActionMapper.class);
+ private static final Logger LOG = LoggerFactory.getLogger(CompositeActionMapper.class);
protected Container container;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java Sun Oct 7 06:26:12 2007
@@ -20,18 +20,19 @@
*/
package org.apache.struts2.dispatcher.mapper;
-import com.opensymphony.xwork2.config.ConfigurationManager;
-import com.opensymphony.xwork2.inject.Inject;
-
-import javax.servlet.http.HttpServletRequest;
+import java.net.URLDecoder;
import java.util.HashMap;
import java.util.StringTokenizer;
-import java.net.URLDecoder;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import javax.servlet.http.HttpServletRequest;
+
import org.apache.struts2.StrutsConstants;
+import com.opensymphony.xwork2.config.ConfigurationManager;
+import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
* <!-- START SNIPPET: description -->
*
@@ -93,7 +94,7 @@
*/
public class Restful2ActionMapper extends DefaultActionMapper {
- protected static final Log LOG = LogFactory.getLog(Restful2ActionMapper.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(Restful2ActionMapper.class);
public static final String HTTP_METHOD_PARAM = "__http_method";
private String idParameterName = null;
@@ -203,7 +204,7 @@
mapping.getParams().putAll(parameters);
}
} catch (Exception e) {
- LOG.warn(e);
+ LOG.warn("Unable to determine parameters from the url", e);
}
mapping.setName(actionName.substring(actionSlashPos+1));
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java Sun Oct 7 06:26:12 2007
@@ -28,11 +28,11 @@
import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.RequestUtils;
import com.opensymphony.xwork2.config.ConfigurationManager;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -63,7 +63,7 @@
*
*/
public class RestfulActionMapper implements ActionMapper {
- protected static final Log LOG = LogFactory.getLog(RestfulActionMapper.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(RestfulActionMapper.class);
/* (non-Javadoc)
* @see org.apache.struts2.dispatcher.mapper.ActionMapper#getMapping(javax.servlet.http.HttpServletRequest)
@@ -105,7 +105,7 @@
}
}
} catch (Exception e) {
- LOG.warn(e);
+ LOG.warn("Cannot determine url parameters", e);
}
return new ActionMapping(actionName, "", "", parameters);
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java Sun Oct 7 06:26:12 2007
@@ -38,11 +38,11 @@
import org.apache.commons.fileupload.disk.DiskFileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.StrutsConstants;
import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* Multipart form data request adapter for Jakarta Commons Fileupload package.
@@ -50,7 +50,7 @@
*/
public class JakartaMultiPartRequest implements MultiPartRequest {
- static final Log log = LogFactory.getLog(MultiPartRequest.class);
+ static final Logger LOG = LoggerFactory.getLogger(MultiPartRequest.class);
// maps parameter name -> List of FileItem objects
private Map<String,List<FileItem>> files = new HashMap<String,List<FileItem>>();
@@ -91,9 +91,9 @@
for (Object item1 : items) {
FileItem item = (FileItem) item1;
- if (log.isDebugEnabled()) log.debug("Found item " + item.getFieldName());
+ if (LOG.isDebugEnabled()) LOG.debug("Found item " + item.getFieldName());
if (item.isFormField()) {
- log.debug("Item is a normal form field");
+ LOG.debug("Item is a normal form field");
List<String> values;
if (params.get(item.getFieldName()) != null) {
values = params.get(item.getFieldName());
@@ -113,11 +113,11 @@
}
params.put(item.getFieldName(), values);
} else {
- log.debug("Item is a file upload");
+ LOG.debug("Item is a file upload");
// Skip file uploads that don't have a file name - meaning that no file was selected.
if (item.getName() == null || item.getName().trim().length() < 1) {
- log.debug("No file has been uploaded for the field: " + item.getFieldName());
+ LOG.debug("No file has been uploaded for the field: " + item.getFieldName());
continue;
}
@@ -133,7 +133,7 @@
}
}
} catch (FileUploadException e) {
- log.error(e);
+ LOG.error("Unable to parse request", e);
errors.add(e.getMessage());
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java Sun Oct 7 06:26:12 2007
@@ -31,10 +31,11 @@
import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.dispatcher.StrutsRequestWrapper;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
* Parse a multipart request and provide a wrapper around the request. The parsing implementation used
@@ -53,7 +54,7 @@
*
*/
public class MultiPartRequestWrapper extends StrutsRequestWrapper {
- protected static final Log log = LogFactory.getLog(MultiPartRequestWrapper.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(MultiPartRequestWrapper.class);
Collection<String> errors;
MultiPartRequest multi;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java Sun Oct 7 06:26:12 2007
@@ -28,15 +28,15 @@
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import org.apache.struts2.ServletActionContext;
+
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
-import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.TextParseUtil;
+import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <!-- START SNIPPET: description -->
@@ -161,7 +161,7 @@
private static final long serialVersionUID = 4153142432948747305L;
- private static final Log LOG = LogFactory.getLog(CookieInterceptor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(CookieInterceptor.class);
private Set cookiesNameSet = Collections.EMPTY_SET;
private Set cookiesValueSet = Collections.EMPTY_SET;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java Sun Oct 7 06:26:12 2007
@@ -20,12 +20,12 @@
*/
package org.apache.struts2.interceptor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <!-- START SNIPPET: description -->
@@ -80,14 +80,14 @@
private static final long serialVersionUID = -4590322556118858869L;
- private static final Log _log = LogFactory.getLog(CreateSessionInterceptor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(CreateSessionInterceptor.class);
/* (non-Javadoc)
* @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation)
*/
public String intercept(ActionInvocation invocation) throws Exception {
- _log.debug("Creating HttpSession");
+ LOG.debug("Creating HttpSession");
ServletActionContext.getRequest().getSession(true);
return invocation.invoke();
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java Sun Oct 7 06:26:12 2007
@@ -23,14 +23,13 @@
import java.util.Collections;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -165,7 +164,7 @@
private static final long serialVersionUID = -2754639196749652512L;
- private static final Log LOG = LogFactory.getLog(ExecuteAndWaitInterceptor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ExecuteAndWaitInterceptor.class);
public static final String KEY = "__execWait";
public static final String WAIT = "wait";
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java Sun Oct 7 06:26:12 2007
@@ -33,8 +33,6 @@
import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;
@@ -44,6 +42,8 @@
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <!-- START SNIPPET: description -->
@@ -162,7 +162,7 @@
private static final long serialVersionUID = -4764627478894962478L;
- protected static final Log log = LogFactory.getLog(FileUploadInterceptor.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(FileUploadInterceptor.class);
private static final String DEFAULT_DELIMITER = ",";
private static final String DEFAULT_MESSAGE = "no.message.found";
@@ -199,9 +199,9 @@
HttpServletRequest request = (HttpServletRequest) ac.get(ServletActionContext.HTTP_REQUEST);
if (!(request instanceof MultiPartRequestWrapper)) {
- if (log.isDebugEnabled()) {
+ if (LOG.isDebugEnabled()) {
ActionProxy proxy = invocation.getProxy();
- log.debug(getTextMessage("struts.messages.bypass.request", new Object[]{proxy.getNamespace(), proxy.getActionName()}, ActionContext.getContext().getLocale()));
+ LOG.debug(getTextMessage("struts.messages.bypass.request", new Object[]{proxy.getNamespace(), proxy.getActionName()}, ActionContext.getContext().getLocale()));
}
return invocation.invoke();
@@ -224,7 +224,7 @@
validation.addActionError(error);
}
- log.error(error);
+ LOG.error(error);
}
}
@@ -257,10 +257,10 @@
}
}
} else {
- log.error(getTextMessage("struts.messages.invalid.file", new Object[]{inputName}, ActionContext.getContext().getLocale()));
+ LOG.error(getTextMessage("struts.messages.invalid.file", new Object[]{inputName}, ActionContext.getContext().getLocale()));
}
} else {
- log.error(getTextMessage("struts.messages.invalid.content.type", new Object[]{inputName}, ActionContext.getContext().getLocale()));
+ LOG.error(getTextMessage("struts.messages.invalid.content.type", new Object[]{inputName}, ActionContext.getContext().getLocale()));
}
}
@@ -274,7 +274,7 @@
File[] file = multiWrapper.getFiles(inputValue);
for (int index = 0; index < file.length; index++) {
File currentFile = file[index];
- log.info(getTextMessage("struts.messages.removing.file", new Object[]{inputValue, currentFile}, ActionContext.getContext().getLocale()));
+ LOG.info(getTextMessage("struts.messages.removing.file", new Object[]{inputValue, currentFile}, ActionContext.getContext().getLocale()));
if ((currentFile != null) && currentFile.isFile()) {
currentFile.delete();
@@ -306,21 +306,21 @@
validation.addFieldError(inputName, errMsg);
}
- log.error(errMsg);
+ LOG.error(errMsg);
} else if (maximumSize != null && maximumSize.longValue() < file.length()) {
String errMsg = getTextMessage("struts.messages.error.file.too.large", new Object[]{inputName, file.getName(), "" + file.length()}, locale);
if (validation != null) {
validation.addFieldError(inputName, errMsg);
}
- log.error(errMsg);
+ LOG.error(errMsg);
} else if ((! allowedTypesSet.isEmpty()) && (!containsItem(allowedTypesSet, contentType))) {
String errMsg = getTextMessage("struts.messages.error.content.type.not.allowed", new Object[]{inputName, file.getName(), contentType}, locale);
if (validation != null) {
validation.addFieldError(inputName, errMsg);
}
- log.error(errMsg);
+ LOG.error(errMsg);
} else {
fileIsAcceptable = true;
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java Sun Oct 7 06:26:12 2007
@@ -25,13 +25,12 @@
import java.util.LinkedHashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.interceptor.Interceptor;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <!-- START SNIPPET: description -->
@@ -140,7 +139,7 @@
private static final long serialVersionUID = 4491997514314242420L;
- private static final Log _log = LogFactory.getLog(MessageStoreInterceptor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(MessageStoreInterceptor.class);
public static final String STORE_MODE = "STORE";
@@ -189,13 +188,13 @@
}
public String intercept(ActionInvocation invocation) throws Exception {
- _log.debug("entering MessageStoreInterceptor ...");
+ LOG.debug("entering MessageStoreInterceptor ...");
before(invocation);
String result = invocation.invoke();
after(invocation, result);
- _log.debug("exit executing MessageStoreInterceptor");
+ LOG.debug("exit executing MessageStoreInterceptor");
return result;
}
@@ -218,7 +217,7 @@
Map session = (Map) invocation.getInvocationContext().get(ActionContext.SESSION);
ValidationAware validationAwareAction = (ValidationAware) action;
- _log.debug("retrieve error / message from session to populate into action ["+action+"]");
+ LOG.debug("retrieve error / message from session to populate into action ["+action+"]");
Collection actionErrors = (Collection) session.get(actionErrorsSessionKey);
Collection actionMessages = (Collection) session.get(actionMessagesSessionKey);
@@ -264,7 +263,7 @@
// store error / messages into session
Map session = (Map) invocation.getInvocationContext().get(ActionContext.SESSION);
- _log.debug("store action ["+action+"] error/messages into session ");
+ LOG.debug("store action ["+action+"] error/messages into session ");
ValidationAware validationAwareAction = (ValidationAware) action;
session.put(actionErrorsSessionKey, validationAwareAction.getActionErrors());
@@ -272,7 +271,7 @@
session.put(fieldErrorsSessionKey, validationAwareAction.getFieldErrors());
}
else {
- _log.debug("Action ["+action+"] is not ValidationAware, no message / error that are storeable");
+ LOG.debug("Action ["+action+"] is not ValidationAware, no message / error that are storeable");
}
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java Sun Oct 7 06:26:12 2007
@@ -20,13 +20,10 @@
*/
package org.apache.struts2.interceptor;
+import java.io.Serializable;
import java.util.IdentityHashMap;
import java.util.Map;
-import java.io.Serializable;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.SessionMap;
@@ -37,6 +34,8 @@
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.interceptor.PreResultListener;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <!-- START SNIPPET: description -->
@@ -142,7 +141,7 @@
private static final long serialVersionUID = 9120762699600054395L;
- private static final Log LOG = LogFactory.getLog(ScopeInterceptor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ScopeInterceptor.class);
private String[] application = null;
private String[] session = null;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java Sun Oct 7 06:26:12 2007
@@ -37,8 +37,6 @@
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.freemarker.FreemarkerManager;
@@ -50,6 +48,8 @@
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.interceptor.PreResultListener;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
/**
@@ -91,7 +91,7 @@
private static final long serialVersionUID = -3097324155953078783L;
- private final static Log log = LogFactory.getLog(DebuggingInterceptor.class);
+ private final static Logger LOG = LoggerFactory.getLogger(DebuggingInterceptor.class);
private String[] ignorePrefixes = new String[]{"org.apache.struts.",
"com.opensymphony.xwork2.", "xwork."};
@@ -191,7 +191,7 @@
try {
result.execute(inv);
} catch (Exception ex) {
- log.error("Unable to create debugging console", ex);
+ LOG.error("Unable to create debugging console", ex);
}
}
@@ -250,7 +250,7 @@
result.setLocation("/org/apache/struts2/interceptor/debugging/browser.ftl");
result.execute(inv);
} catch (Exception ex) {
- log.error("Unable to create debugging console", ex);
+ LOG.error("Unable to create debugging console", ex);
}
}
@@ -365,8 +365,8 @@
writer.flush();
// Check stack for this object
if ((bean != null) && (stack.contains(bean))) {
- if (log.isInfoEnabled()) {
- log.info("Circular reference detected, not serializing object: "
+ if (LOG.isInfoEnabled()) {
+ LOG.info("Circular reference detected, not serializing object: "
+ name);
}
return;
@@ -426,7 +426,7 @@
}
}
} catch (Exception e) {
- log.error(e, e);
+ LOG.error(e.toString(), e);
}
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/JSONValidationInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/JSONValidationInterceptor.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/JSONValidationInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/JSONValidationInterceptor.java Sun Oct 7 06:26:12 2007
@@ -29,14 +29,14 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <p>Serializes validation and action errors into JSON. This interceptor does not
@@ -65,8 +65,7 @@
* use this interceptor</p>
*/
public class JSONValidationInterceptor extends MethodFilterInterceptor {
- private static final Log LOG = LogFactory
- .getLog(JSONValidationInterceptor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(JSONValidationInterceptor.class);
private static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
private static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java Sun Oct 7 06:26:12 2007
@@ -25,10 +25,9 @@
import java.util.List;
import java.util.StringTokenizer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.Action;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -38,7 +37,7 @@
*/
public class IteratorGenerator implements Iterator, Action {
- private static final Log _log = LogFactory.getLog(IteratorGenerator.class);
+ private static final Logger LOG = LoggerFactory.getLogger(IteratorGenerator.class);
List values;
Object value;
@@ -93,7 +92,7 @@
values.add(convertedObj);
}
catch(Exception e) { // make sure things, goes on, we just ignore the bad ones
- _log.warn("unable to convert ["+token+"], skipping this token, it will not appear in the generated iterator", e);
+ LOG.warn("unable to convert ["+token+"], skipping this token, it will not appear in the generated iterator", e);
}
}
else {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java Sun Oct 7 06:26:12 2007
@@ -26,9 +26,8 @@
import java.util.Iterator;
import java.util.List;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.Action;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -67,7 +66,7 @@
} else {
try {
if (!MakeIterator.isIterable(source)) {
- LogFactory.getLog(SortIteratorFilter.class.getName()).warn("Cannot create SortIterator for source " + source);
+ LoggerFactory.getLogger(SortIteratorFilter.class.getName()).warn("Cannot create SortIterator for source " + source);
return ERROR;
}
@@ -86,7 +85,7 @@
return SUCCESS;
} catch (Exception e) {
- LogFactory.getLog(SortIteratorFilter.class.getName()).warn("Error creating sort iterator.", e);
+ LoggerFactory.getLogger(SortIteratorFilter.class.getName()).warn("Error creating sort iterator.", e);
return ERROR;
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsUtil.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsUtil.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsUtil.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsUtil.java Sun Oct 7 06:26:12 2007
@@ -39,16 +39,16 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.views.jsp.ui.OgnlTool;
import org.apache.struts2.views.util.UrlHelper;
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.TextUtils;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ObjectFactory;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -57,7 +57,7 @@
*/
public class StrutsUtil {
- protected static final Log log = LogFactory.getLog(StrutsUtil.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(StrutsUtil.class);
protected HttpServletRequest request;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java Sun Oct 7 06:26:12 2007
@@ -24,10 +24,9 @@
import java.util.Iterator;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.Action;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -36,7 +35,7 @@
*/
public class SubsetIteratorFilter extends IteratorFilterSupport implements Iterator, Action {
- private static final Log _log = LogFactory.getLog(SubsetIteratorFilter.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SubsetIteratorFilter.class);
Iterator iterator;
Object source;
@@ -69,7 +68,7 @@
// Action implementation -----------------------------------------
public String execute() {
if (source == null) {
- LogFactory.getLog(SubsetIteratorFilter.class.getName()).warn("Source is null returning empty set.");
+ LoggerFactory.getLogger(SubsetIteratorFilter.class.getName()).warn("Source is null returning empty set.");
return ERROR;
}
@@ -167,7 +166,7 @@
return okToAdd;
}
catch(Exception e) {
- _log.warn("decider ["+decider+"] encountered an error while decide adding element ["+element+"], element will be ignored, it will not appeared in subseted iterator", e);
+ LOG.warn("decider ["+decider+"] encountered an error while decide adding element ["+element+"], element will be ignored, it will not appeared in subseted iterator", e);
return false;
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TokenHelper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TokenHelper.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TokenHelper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TokenHelper.java Sun Oct 7 06:26:12 2007
@@ -24,11 +24,10 @@
import java.util.Map;
import java.util.Random;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* TokenHelper
@@ -45,7 +44,7 @@
* The name of the field which will hold the token name
*/
public static final String TOKEN_NAME_FIELD = "struts.token.name";
- private static final Log LOG = LogFactory.getLog(TokenHelper.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TokenHelper.class);
private static final Random RANDOM = new Random();
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/validators/DWRValidator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/validators/DWRValidator.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/validators/DWRValidator.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/validators/DWRValidator.java Sun Oct 7 06:26:12 2007
@@ -27,8 +27,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.dispatcher.ApplicationMap;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.RequestMap;
@@ -46,6 +44,8 @@
import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <p/>
@@ -65,7 +65,7 @@
* </pre>
*/
public class DWRValidator {
- private static final Log LOG = LogFactory.getLog(DWRValidator.class);
+ private static final Logger LOG = LoggerFactory.getLogger(DWRValidator.class);
private ActionProxyFactory actionProxyFactory;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java Sun Oct 7 06:26:12 2007
@@ -35,8 +35,6 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.JspSupportServlet;
import org.apache.struts2.views.TagLibrary;
@@ -46,6 +44,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.FileManager;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
import freemarker.cache.FileTemplateLoader;
import freemarker.cache.MultiTemplateLoader;
@@ -101,7 +101,7 @@
*/
public class FreemarkerManager {
- private static final Log LOG = LogFactory.getLog(FreemarkerManager.class);
+ private static final Logger LOG = LoggerFactory.getLogger(FreemarkerManager.class);
public static final String CONFIG_SERVLET_CONTEXT_KEY = "freemarker.Configuration";
public static final String KEY_EXCEPTION = "exception";
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java Sun Oct 7 06:26:12 2007
@@ -29,13 +29,13 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.components.Component;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
import freemarker.template.DefaultObjectWrapper;
import freemarker.template.SimpleNumber;
@@ -45,7 +45,7 @@
import freemarker.template.TemplateTransformModel;
public abstract class TagModel implements TemplateTransformModel {
- private static final Log LOG = LogFactory.getLog(TagModel.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TagModel.class);
protected ValueStack stack;
protected HttpServletRequest req;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/BeanTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/BeanTag.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/BeanTag.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/BeanTag.java Sun Oct 7 06:26:12 2007
@@ -23,12 +23,12 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.components.Bean;
import org.apache.struts2.components.Component;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -38,7 +38,7 @@
private static final long serialVersionUID = -3863152522071209267L;
- protected static Log log = LogFactory.getLog(BeanTag.class);
+ protected static Logger LOG = LoggerFactory.getLogger(BeanTag.class);
protected String name;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java Sun Oct 7 06:26:12 2007
@@ -22,14 +22,15 @@
import javax.servlet.jsp.JspException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.struts2.views.annotations.StrutsTag;
-import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.util.IteratorGenerator;
import org.apache.struts2.util.IteratorGenerator.Converter;
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.views.jsp.StrutsBodyTagSupport;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
* <!-- START SNIPPET: javadoc -->
@@ -132,7 +133,7 @@
public static final String DEFAULT_SEPARATOR = ",";
- private static final Log _log = LogFactory.getLog(IteratorGeneratorTag.class);
+ private static final Logger LOG = LoggerFactory.getLogger(IteratorGeneratorTag.class);
String countAttr;
String separatorAttr;
@@ -213,7 +214,7 @@
count = Integer.parseInt((String)countObj);
}
catch(NumberFormatException e) {
- _log.warn("unable to convert count attribute ["+countObj+"] to number, ignore count attribute", e);
+ LOG.warn("unable to convert count attribute ["+countObj+"] to number, ignore count attribute", e);
}
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java Sun Oct 7 06:26:12 2007
@@ -22,14 +22,15 @@
import javax.servlet.jsp.JspException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.struts2.views.annotations.StrutsTag;
-import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.util.SubsetIteratorFilter;
import org.apache.struts2.util.SubsetIteratorFilter.Decider;
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.views.jsp.StrutsBodyTagSupport;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
* <!-- START SNIPPET: javadoc -->
@@ -153,7 +154,7 @@
private static final long serialVersionUID = -6252696081713080102L;
- private static final Log _log = LogFactory.getLog(SubsetIteratorTag.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SubsetIteratorTag.class);
String countAttr;
String sourceAttr;
@@ -230,7 +231,7 @@
count = Integer.parseInt((String)countObj);
}
catch(NumberFormatException e) {
- _log.warn("unable to convert count attribute ["+countObj+"] to number, ignore count attribute", e);
+ LOG.warn("unable to convert count attribute ["+countObj+"] to number, ignore count attribute", e);
}
}
}
@@ -256,7 +257,7 @@
start = Integer.parseInt((String)startObj);
}
catch(NumberFormatException e) {
- _log.warn("unable to convert count attribute ["+startObj+"] to number, ignore count attribute", e);
+ LOG.warn("unable to convert count attribute ["+startObj+"] to number, ignore count attribute", e);
}
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/UrlHelper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/UrlHelper.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/UrlHelper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/UrlHelper.java Sun Oct 7 06:26:12 2007
@@ -33,8 +33,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
@@ -42,6 +40,8 @@
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.TextParseUtil;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -49,7 +49,7 @@
*
*/
public class UrlHelper {
- private static final Log LOG = LogFactory.getLog(UrlHelper.class);
+ private static final Logger LOG = LoggerFactory.getLogger(UrlHelper.class);
/**
* Default HTTP port (80).
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java Sun Oct 7 06:26:12 2007
@@ -37,8 +37,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsException;
@@ -58,6 +56,8 @@
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -65,7 +65,7 @@
*
*/
public class VelocityManager {
- private static final Log log = LogFactory.getLog(VelocityManager.class);
+ private static final Logger LOG = LoggerFactory.getLogger(VelocityManager.class);
public static final String STRUTS = "struts";
private ObjectFactory objectFactory;
@@ -185,7 +185,7 @@
ctx = ServletActionContext.getServletContext();
} catch (NullPointerException npe) {
// in case this was used outside the lifecycle of struts servlet
- log.debug("internal toolbox context ignored");
+ LOG.debug("internal toolbox context ignored");
}
if (toolboxManager != null && ctx != null) {
@@ -219,7 +219,7 @@
VelocityContext velocityContext = (VelocityContext) objectFactory.buildBean(className, null);
contextList.add(velocityContext);
} catch (Exception e) {
- log.warn("Warning. " + e.getClass().getName() + " caught while attempting to instantiate a chained VelocityContext, " + className + " -- skipping");
+ LOG.warn("Warning. " + e.getClass().getName() + " caught while attempting to instantiate a chained VelocityContext, " + className + " -- skipping");
}
}
if (contextList.size() > 0) {
@@ -258,7 +258,7 @@
public Properties loadConfiguration(ServletContext context) {
if (context == null) {
String gripe = "Error attempting to create a loadConfiguration from a null ServletContext!";
- log.error(gripe);
+ LOG.error(gripe);
throw new IllegalArgumentException(gripe);
}
@@ -326,11 +326,11 @@
// if we've got something, load 'er up
if (in != null) {
- log.info("Initializing velocity using " + resourceLocation);
+ LOG.info("Initializing velocity using " + resourceLocation);
properties.load(in);
}
} catch (IOException e) {
- log.warn("Unable to load velocity configuration " + resourceLocation, e);
+ LOG.warn("Unable to load velocity configuration " + resourceLocation, e);
} finally {
if (in != null) {
try {
@@ -361,16 +361,16 @@
// for debugging purposes, allows users to dump out the properties that have been configured
- if (log.isDebugEnabled()) {
- log.debug("Initializing Velocity with the following properties ...");
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Initializing Velocity with the following properties ...");
for (Iterator iter = properties.keySet().iterator();
iter.hasNext();) {
String key = (String) iter.next();
String value = properties.getProperty(key);
- if (log.isDebugEnabled()) {
- log.debug(" '" + key + "' = '" + value + "'");
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(" '" + key + "' = '" + value + "'");
}
}
}
@@ -455,7 +455,7 @@
protected VelocityEngine newVelocityEngine(ServletContext context) {
if (context == null) {
String gripe = "Error attempting to create a new VelocityEngine from a null ServletContext!";
- log.error(gripe);
+ LOG.error(gripe);
throw new IllegalArgumentException(gripe);
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java Sun Oct 7 06:26:12 2007
@@ -24,8 +24,6 @@
import java.util.LinkedList;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.StrutsException;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
@@ -34,6 +32,9 @@
import org.w3c.dom.NodeList;
import org.w3c.dom.UserDataHandler;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
* AbstractAdapterNode is the base for childAdapters that expose a read-only view
* of a Java object as a DOM Node. This class implements the core parent-child
@@ -80,7 +81,7 @@
};
private List<Node> childAdapters;
- private Log log = LogFactory.getLog(this.getClass());
+ private Logger log = LoggerFactory.getLogger(this.getClass());
// The domain object that we are adapting
private Object propertyValue;
@@ -90,8 +91,8 @@
public AbstractAdapterNode() {
- if (LogFactory.getLog(getClass()).isDebugEnabled()) {
- LogFactory.getLog(getClass()).debug("Creating " + this);
+ if (LoggerFactory.getLogger(getClass()).isDebugEnabled()) {
+ LoggerFactory.getLogger(getClass()).debug("Creating " + this);
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ArrayAdapter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ArrayAdapter.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ArrayAdapter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ArrayAdapter.java Sun Oct 7 06:26:12 2007
@@ -23,16 +23,17 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Node;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
*/
public class ArrayAdapter extends AbstractAdapterElement {
- private Log log = LogFactory.getLog(this.getClass());
+ private Logger log = LoggerFactory.getLogger(this.getClass());
public ArrayAdapter() {
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/BeanAdapter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/BeanAdapter.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/BeanAdapter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/BeanAdapter.java Sun Oct 7 06:26:12 2007
@@ -30,12 +30,13 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.StrutsException;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
* This class is the most general type of adapter, utilizing reflective introspection to present a DOM view of all of
@@ -64,7 +65,7 @@
//~ Instance fields ////////////////////////////////////////////////////////
- private Log log = LogFactory.getLog(this.getClass());
+ private Logger log = LoggerFactory.getLogger(this.getClass());
//~ Constructors ///////////////////////////////////////////////////////////
@@ -121,7 +122,7 @@
} catch (Exception e) {
if (e instanceof InvocationTargetException)
e = (Exception) ((InvocationTargetException) e).getTargetException();
- log.error(e);
+ log.error("Cannot access bean property: "+propertyName, e);
continue;
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/CollectionAdapter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/CollectionAdapter.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/CollectionAdapter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/CollectionAdapter.java Sun Oct 7 06:26:12 2007
@@ -24,16 +24,17 @@
import java.util.Collection;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Node;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
*/
public class CollectionAdapter extends AbstractAdapterElement {
- private Log log = LogFactory.getLog(this.getClass());
+ private Logger log = LoggerFactory.getLogger(this.getClass());
public CollectionAdapter() { }
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ProxyElementAdapter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ProxyElementAdapter.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ProxyElementAdapter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ProxyElementAdapter.java Sun Oct 7 06:26:12 2007
@@ -23,8 +23,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Element;
@@ -32,6 +30,9 @@
import org.w3c.dom.NodeList;
import org.w3c.dom.TypeInfo;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
* ProxyElementAdapter is a pass-through adapter for objects which already
* implement the Element interface. All methods are proxied to the underlying
@@ -43,7 +44,7 @@
*/
public class ProxyElementAdapter extends ProxyNodeAdapter implements Element {
- private Log log = LogFactory.getLog(this.getClass());
+ private Logger log = LoggerFactory.getLogger(this.getClass());
public ProxyElementAdapter(AdapterFactory factory, AdapterNode parent, Element value) {
super(factory, parent, value);
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ProxyNodeAdapter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ProxyNodeAdapter.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ProxyNodeAdapter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ProxyNodeAdapter.java Sun Oct 7 06:26:12 2007
@@ -20,12 +20,13 @@
*/
package org.apache.struts2.views.xslt;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.w3c.dom.DOMException;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
/**
* ProxyNodeAdapter is a read-only delegating adapter for objects which already
* implement the Node interface. All methods are proxied to the underlying
@@ -34,7 +35,7 @@
*/
public abstract class ProxyNodeAdapter extends AbstractAdapterNode {
- private Log log = LogFactory.getLog(this.getClass());
+ private Logger log = LoggerFactory.getLogger(this.getClass());
public ProxyNodeAdapter(AdapterFactory factory, AdapterNode parent, Node value) {
setContext(factory, parent, "document"/*propname unused*/, value);
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ServletURIResolver.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ServletURIResolver.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ServletURIResolver.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/ServletURIResolver.java Sun Oct 7 06:26:12 2007
@@ -28,8 +28,8 @@
import javax.xml.transform.URIResolver;
import javax.xml.transform.stream.StreamSource;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -41,7 +41,7 @@
*/
public class ServletURIResolver implements URIResolver {
- private Log log = LogFactory.getLog(getClass());
+ private Logger log = LoggerFactory.getLogger(getClass());
static final String PROTOCOL = "response:";
private ServletContext sc;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/SimpleNodeList.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/SimpleNodeList.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/SimpleNodeList.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/SimpleNodeList.java Sun Oct 7 06:26:12 2007
@@ -22,14 +22,15 @@
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
public class SimpleNodeList implements NodeList {
- private Log log = LogFactory.getLog(SimpleNodeList.class);
+ private Logger log = LoggerFactory.getLogger(SimpleNodeList.class);
private List<Node> nodes;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/StringAdapter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/StringAdapter.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/StringAdapter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/StringAdapter.java Sun Oct 7 06:26:12 2007
@@ -24,14 +24,12 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import org.w3c.dom.Node;
-
import org.xml.sax.InputSource;
import com.opensymphony.xwork2.util.DomHelper;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* StringAdapter adapts a Java String value to a DOM Element with the specified
@@ -48,7 +46,7 @@
*/
public class StringAdapter extends AbstractAdapterElement {
- private Log log = LogFactory.getLog(this.getClass());
+ private Logger log = LoggerFactory.getLogger(this.getClass());
boolean parseStringAsXML;
public StringAdapter() {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java Sun Oct 7 06:26:12 2007
@@ -39,8 +39,6 @@
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
@@ -50,6 +48,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.TextParseUtil;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -207,7 +207,7 @@
private static final long serialVersionUID = 6424691441777176763L;
/** Log instance for this result. */
- private static final Log LOG = LogFactory.getLog(XSLTResult.class);
+ private static final Logger LOG = LoggerFactory.getLogger(XSLTResult.class);
/** 'stylesheetLocation' parameter. Points to the xsl. */
public static final String DEFAULT_PARAM = "stylesheetLocation";
Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/ExecutionCountTestAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/ExecutionCountTestAction.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/ExecutionCountTestAction.java (original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/ExecutionCountTestAction.java Sun Oct 7 06:26:12 2007
@@ -20,10 +20,9 @@
*/
package org.apache.struts2;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.ActionSupport;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -34,7 +33,7 @@
private static final long serialVersionUID = -2954211394678430609L;
- private static final Log LOG = LogFactory.getLog(ExecutionCountTestAction.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ExecutionCountTestAction.class);
private int executionCount = 0;
Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/TestResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/TestResult.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/TestResult.java (original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/TestResult.java Sun Oct 7 06:26:12 2007
@@ -25,13 +25,12 @@
import junit.framework.Assert;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Result;
import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
@@ -43,7 +42,7 @@
private static final long serialVersionUID = -4429258122011663164L;
- private static final Log LOG = LogFactory.getLog(TestResult.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TestResult.class);
private List expectedValues = new ArrayList();
Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java (original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java Sun Oct 7 06:26:12 2007
@@ -34,19 +34,19 @@
import java.util.Map;
import java.util.StringTokenizer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.views.jsp.ui.AbstractUITag;
import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
*/
public abstract class AbstractUITagTest extends AbstractTagTest {
- private static final Log LOG = LogFactory.getLog(AbstractUITagTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(AbstractUITagTest.class);
static final String FREEMARKER_ERROR_EXPECTATION = "Java backtrace for programmers:";
Modified: struts/struts2/trunk/plugins/codebehind/src/main/java/org/apache/struts2/codebehind/CodebehindUnknownHandler.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/codebehind/src/main/java/org/apache/struts2/codebehind/CodebehindUnknownHandler.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/codebehind/src/main/java/org/apache/struts2/codebehind/CodebehindUnknownHandler.java (original)
+++ struts/struts2/trunk/plugins/codebehind/src/main/java/org/apache/struts2/codebehind/CodebehindUnknownHandler.java Sun Oct 7 06:26:12 2007
@@ -22,7 +22,6 @@
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
@@ -31,8 +30,6 @@
import javax.servlet.ServletContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.util.ClassLoaderUtils;
import com.opensymphony.xwork2.Action;
@@ -50,6 +47,8 @@
import com.opensymphony.xwork2.config.entities.ResultTypeConfig;
import com.opensymphony.xwork2.config.providers.InterceptorBuilder;
import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* Uses code-behind conventions to solve the two unknown problems.
@@ -63,7 +62,7 @@
protected Configuration configuration;
protected ObjectFactory objectFactory;
- protected static final Log LOG = LogFactory.getLog(CodebehindUnknownHandler.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(CodebehindUnknownHandler.class);
@Inject
public CodebehindUnknownHandler(@Inject("struts.codebehind.defaultPackage") String defaultPackage,
Modified: struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java?rev=582626&r1=582625&r2=582626&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java (original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java Sun Oct 7 06:26:12 2007
@@ -24,13 +24,11 @@
import java.util.Set;
import java.util.TreeSet;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import com.opensymphony.xwork2.ObjectFactory;
-import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
/**
@@ -48,7 +46,7 @@
private Set actionNames;
private String detailView = "results";
private PropertyDescriptor[] properties;
- private static Log log = LogFactory.getLog(ShowConfigAction.class);
+ private static Logger LOG = LoggerFactory.getLogger(ShowConfigAction.class);
private ConfigurationHelper configHelper;
private ObjectFactory objectFactory;
@@ -118,7 +116,7 @@
Class clazz = objectFactory.getClassInstance(getConfig().getClassName());
properties = reflectionProvider.getPropertyDescriptors(clazz);
} catch (Exception e) {
- log.error("Unable to get properties for action " + actionName, e);
+ LOG.error("Unable to get properties for action " + actionName, e);
addActionError("Unable to retrieve action properties: " + e.toString());
}