diff --git a/apps/jboss-blank/src/test/java/example/HelloWorldTest.java b/apps/jboss-blank/src/test/java/example/HelloWorldTest.java
index bdd80d372d..4a89271e1a 100644
--- a/apps/jboss-blank/src/test/java/example/HelloWorldTest.java
+++ b/apps/jboss-blank/src/test/java/example/HelloWorldTest.java
@@ -21,9 +21,8 @@
package example;
-import org.apache.struts2.StrutsTestCase;
-
import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.StrutsTestCase;
public class HelloWorldTest extends StrutsTestCase {
diff --git a/apps/mailreader/src/main/java/mailreader2/ApplicationListener.java b/apps/mailreader/src/main/java/mailreader2/ApplicationListener.java
index 2233375f65..35e39fdae2 100644
--- a/apps/mailreader/src/main/java/mailreader2/ApplicationListener.java
+++ b/apps/mailreader/src/main/java/mailreader2/ApplicationListener.java
@@ -21,20 +21,14 @@
package mailreader2;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.struts.apps.mailreader.dao.impl.memory.MemoryUserDatabase;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
-
-import org.apache.struts.apps.mailreader.dao.impl.memory.MemoryUserDatabase;
-
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import java.io.*;
/**
*
ServletContextListener
that initializes and finalizes the
@@ -100,7 +94,7 @@ public final class ApplicationListener implements ServletContextListener {
/**
*
Logging output for this plug in instance.
*/
- private Logger log = LoggerFactory.getLogger(this.getClass());
+ private Logger log = LogManager.getLogger(this.getClass());
// ------------------------------------------------------------- Properties
diff --git a/apps/mailreader/src/main/java/mailreader2/AuthenticationInterceptor.java b/apps/mailreader/src/main/java/mailreader2/AuthenticationInterceptor.java
index 254d968bfa..77470a506c 100644
--- a/apps/mailreader/src/main/java/mailreader2/AuthenticationInterceptor.java
+++ b/apps/mailreader/src/main/java/mailreader2/AuthenticationInterceptor.java
@@ -20,12 +20,13 @@
*/
package mailreader2;
-import com.opensymphony.xwork2.interceptor.Interceptor;
-import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Action;
-import java.util.Map;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.Interceptor;
import org.apache.struts.apps.mailreader.dao.User;
+import java.util.Map;
+
public class AuthenticationInterceptor implements Interceptor {
public void destroy () {}
diff --git a/apps/mailreader/src/main/java/mailreader2/Login.java b/apps/mailreader/src/main/java/mailreader2/Login.java
index 0efa19b103..d4c14038c2 100644
--- a/apps/mailreader/src/main/java/mailreader2/Login.java
+++ b/apps/mailreader/src/main/java/mailreader2/Login.java
@@ -21,8 +21,8 @@
package mailreader2;
-import org.apache.struts.apps.mailreader.dao.User;
import org.apache.struts.apps.mailreader.dao.ExpiredPasswordException;
+import org.apache.struts.apps.mailreader.dao.User;
/**
* Validate a user login.
diff --git a/apps/mailreader/src/main/java/mailreader2/MailreaderSupport.java b/apps/mailreader/src/main/java/mailreader2/MailreaderSupport.java
index 02bad38bf3..0136284ff8 100644
--- a/apps/mailreader/src/main/java/mailreader2/MailreaderSupport.java
+++ b/apps/mailreader/src/main/java/mailreader2/MailreaderSupport.java
@@ -21,8 +21,9 @@
package mailreader2;
-import java.util.Map;
-
+import com.opensymphony.xwork2.ActionSupport;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.apache.struts.apps.mailreader.dao.ExpiredPasswordException;
import org.apache.struts.apps.mailreader.dao.Subscription;
import org.apache.struts.apps.mailreader.dao.User;
@@ -32,9 +33,7 @@
import org.apache.struts2.interceptor.ApplicationAware;
import org.apache.struts2.interceptor.SessionAware;
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import java.util.Map;
/**
* Base Action for MailreaderSupport application.
@@ -388,7 +387,7 @@ public User findUser(String username, String password)
/**
* Log
instance for this application.
*/
- protected Logger log = LoggerFactory.getLogger(Constants.PACKAGE);
+ protected Logger log = LogManager.getLogger(Constants.PACKAGE);
/**
* Persist the User object, including subscriptions, to the database.
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java
index cd4f9987bb..b2703169a5 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java
@@ -25,14 +25,14 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.dispatcher.SessionMap;
public class ChatAuthenticationInterceptor implements Interceptor {
private static final long serialVersionUID = 1L;
- private static final Logger LOG = LoggerFactory.getLogger(ChatAuthenticationInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ChatAuthenticationInterceptor.class);
public static final String USER_SESSION_KEY = "chatUserSessionKey";
public void destroy() {
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java
index cab13bdb3f..06a41d9699 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import javax.servlet.http.HttpSession;
@@ -34,7 +34,7 @@
*/
public class ChatInterceptor implements Interceptor {
- private static final Logger LOG = LoggerFactory.getLogger(ChatInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ChatInterceptor.class);
private static final long serialVersionUID = 1L;
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatSessionListener.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatSessionListener.java
index eb09746cd8..7812cba491 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatSessionListener.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatSessionListener.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
@@ -31,7 +31,7 @@
public class ChatSessionListener implements HttpSessionListener {
- private static final Logger LOG = LoggerFactory.getLogger(ChatSessionListener.class);
+ private static final Logger LOG = LogManager.getLogger(ChatSessionListener.class);
public void sessionCreated(HttpSessionEvent event) {
}
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java
index 8935497d0d..5debf9dfb1 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.showcase.chat;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.util.StrutsTypeConverter;
import java.text.ParseException;
@@ -31,7 +31,7 @@
public class DateConverter extends StrutsTypeConverter {
- private static final Logger LOG = LoggerFactory.getLogger(DateConverter.class);
+ private static final Logger LOG = LogManager.getLogger(DateConverter.class);
public Object convertFromString(Map context, String[] values, Class toClass) {
diff --git a/bundles/demo/src/main/java/actions/osgi/BundlesAction.java b/bundles/demo/src/main/java/actions/osgi/BundlesAction.java
index 0bf8b2fe1b..eff79cccea 100644
--- a/bundles/demo/src/main/java/actions/osgi/BundlesAction.java
+++ b/bundles/demo/src/main/java/actions/osgi/BundlesAction.java
@@ -20,15 +20,11 @@
*/
package actions.osgi;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Bundle;
-import org.apache.struts2.osgi.interceptor.BundleContextAware;
-import org.apache.struts2.osgi.interceptor.ServiceAware;
-import org.apache.struts2.convention.annotation.ResultPath;
-
-import java.util.List;
-
import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.convention.annotation.ResultPath;
+import org.apache.struts2.osgi.interceptor.BundleContextAware;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
/**
* This action shows how to interact with the OSGi container, using the OSGi interceptor
diff --git a/bundles/demo/src/main/java/actions/osgi/HelloWorldAction.java b/bundles/demo/src/main/java/actions/osgi/HelloWorldAction.java
index f38c68ac44..cfaa2797a2 100644
--- a/bundles/demo/src/main/java/actions/osgi/HelloWorldAction.java
+++ b/bundles/demo/src/main/java/actions/osgi/HelloWorldAction.java
@@ -3,11 +3,6 @@
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ResultPath;
-import org.apache.struts2.osgi.interceptor.BundleContextAware;
-import org.apache.struts2.osgi.interceptor.ServiceAware;
-import org.osgi.framework.BundleContext;
-
-import java.util.List;
@ResultPath("/content")
public class HelloWorldAction extends ActionSupport {
diff --git a/bundles/demo/src/main/resources/META-INF/spring/applicationContext.xml b/bundles/demo/src/main/resources/META-INF/spring/applicationContext.xml
index bc3cc3145a..aae9d2b422 100644
--- a/bundles/demo/src/main/resources/META-INF/spring/applicationContext.xml
+++ b/bundles/demo/src/main/resources/META-INF/spring/applicationContext.xml
@@ -1,9 +1,6 @@
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
diff --git a/core/pom.xml b/core/pom.xml
index 6eed44f489..15fd2c52d4 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -191,6 +191,13 @@
true
+
+
+ org.apache.logging.log4j
+ log4j-api
+ ${log4j2.version}
+
+
commons-fileupload
@@ -258,12 +265,6 @@
test
-
- log4j
- log4j
- test
-
-
org.mockito
mockito-all
diff --git a/core/src/main/java/org/apache/struts2/RequestUtils.java b/core/src/main/java/org/apache/struts2/RequestUtils.java
index aa911a5e3c..0ba079ddcd 100644
--- a/core/src/main/java/org/apache/struts2/RequestUtils.java
+++ b/core/src/main/java/org/apache/struts2/RequestUtils.java
@@ -21,9 +21,9 @@
package org.apache.struts2;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang3.time.FastDateFormat;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
@@ -37,7 +37,7 @@
*/
public class RequestUtils {
- private static final Logger LOG = LoggerFactory.getLogger(RequestUtils.class);
+ private static final Logger LOG = LogManager.getLogger(RequestUtils.class);
private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
diff --git a/core/src/main/java/org/apache/struts2/ServletActionContext.java b/core/src/main/java/org/apache/struts2/ServletActionContext.java
index db34fdaeee..e3f50af5e0 100644
--- a/core/src/main/java/org/apache/struts2/ServletActionContext.java
+++ b/core/src/main/java/org/apache/struts2/ServletActionContext.java
@@ -21,17 +21,15 @@
package org.apache.struts2;
-import java.util.Map;
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.util.ValueStack;
+import org.apache.struts2.dispatcher.mapper.ActionMapping;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
-
-import org.apache.struts2.dispatcher.mapper.ActionMapping;
-
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.util.ValueStack;
+import java.util.Map;
/**
diff --git a/core/src/main/java/org/apache/struts2/components/ActionComponent.java b/core/src/main/java/org/apache/struts2/components/ActionComponent.java
index f184454612..fd583396b6 100644
--- a/core/src/main/java/org/apache/struts2/components/ActionComponent.java
+++ b/core/src/main/java/org/apache/struts2/components/ActionComponent.java
@@ -28,8 +28,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsException;
import org.apache.struts2.StrutsStatics;
@@ -118,7 +118,7 @@
*/
@StrutsTag(name="action", tldTagClass="org.apache.struts2.views.jsp.ActionTag", description="Execute an action from within a view")
public class ActionComponent extends ContextBean {
- private static final Logger LOG = LoggerFactory.getLogger(ActionComponent.class);
+ private static final Logger LOG = LogManager.getLogger(ActionComponent.class);
protected HttpServletResponse res;
protected HttpServletRequest req;
diff --git a/core/src/main/java/org/apache/struts2/components/Anchor.java b/core/src/main/java/org/apache/struts2/components/Anchor.java
index 697d8f2af0..3d7fdf9831 100644
--- a/core/src/main/java/org/apache/struts2/components/Anchor.java
+++ b/core/src/main/java/org/apache/struts2/components/Anchor.java
@@ -23,8 +23,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -61,7 +61,7 @@
description = "Render a HTML href element that when clicked can optionally call a URL via remote XMLHttpRequest and updates its targets",
allowDynamicAttributes = true)
public class Anchor extends ClosingUIBean {
- private static final Logger LOG = LoggerFactory.getLogger(Anchor.class);
+ private static final Logger LOG = LogManager.getLogger(Anchor.class);
public static final String OPEN_TEMPLATE = "a";
public static final String TEMPLATE = "a-close";
diff --git a/core/src/main/java/org/apache/struts2/components/AppendIterator.java b/core/src/main/java/org/apache/struts2/components/AppendIterator.java
index 633fc0a0de..6021fe352c 100644
--- a/core/src/main/java/org/apache/struts2/components/AppendIterator.java
+++ b/core/src/main/java/org/apache/struts2/components/AppendIterator.java
@@ -33,8 +33,8 @@
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -119,7 +119,7 @@
@StrutsTag(name="append", tldTagClass="org.apache.struts2.views.jsp.iterator.AppendIteratorTag", description="Append the values of a list of iterators to one iterator")
public class AppendIterator extends ContextBean implements UnnamedParametric {
- private static final Logger LOG = LoggerFactory.getLogger(AppendIterator.class);
+ private static final Logger LOG = LogManager.getLogger(AppendIterator.class);
private AppendIteratorFilter appendIteratorFilter= null;
private List _parameters;
diff --git a/core/src/main/java/org/apache/struts2/components/Bean.java b/core/src/main/java/org/apache/struts2/components/Bean.java
index eb361c1e10..2039d95c8d 100644
--- a/core/src/main/java/org/apache/struts2/components/Bean.java
+++ b/core/src/main/java/org/apache/struts2/components/Bean.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.ObjectFactory;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -95,7 +95,7 @@
@StrutsTag(name = "bean", tldTagClass = "org.apache.struts2.views.jsp.BeanTag",
description = "Instantiate a JavaBean and place it in the context")
public class Bean extends ContextBean {
- protected static final Logger LOG = LoggerFactory.getLogger(Bean.class);
+ protected static final Logger LOG = LogManager.getLogger(Bean.class);
protected Object bean;
protected String name;
diff --git a/core/src/main/java/org/apache/struts2/components/ClosingUIBean.java b/core/src/main/java/org/apache/struts2/components/ClosingUIBean.java
index d315fd7a7c..123d58bc79 100644
--- a/core/src/main/java/org/apache/struts2/components/ClosingUIBean.java
+++ b/core/src/main/java/org/apache/struts2/components/ClosingUIBean.java
@@ -22,8 +22,8 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import javax.servlet.http.HttpServletRequest;
@@ -34,7 +34,7 @@
* ClosingUIBean is the standard superclass for UI components such as div etc.
*/
public abstract class ClosingUIBean extends UIBean {
- private static final Logger LOG = LoggerFactory.getLogger(ClosingUIBean.class);
+ private static final Logger LOG = LogManager.getLogger(ClosingUIBean.class);
protected ClosingUIBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
diff --git a/core/src/main/java/org/apache/struts2/components/Component.java b/core/src/main/java/org/apache/struts2/components/Component.java
index 62e07ee29d..bde06c0233 100644
--- a/core/src/main/java/org/apache/struts2/components/Component.java
+++ b/core/src/main/java/org/apache/struts2/components/Component.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.util.AnnotationUtils;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsException;
@@ -60,7 +60,7 @@
*/
public class Component {
- private static final Logger LOG = LoggerFactory.getLogger(Component.class);
+ private static final Logger LOG = LogManager.getLogger(Component.class);
public static final String COMPONENT_STACK = "__component_stack";
diff --git a/core/src/main/java/org/apache/struts2/components/Date.java b/core/src/main/java/org/apache/struts2/components/Date.java
index 0bb1207052..e0862762c3 100644
--- a/core/src/main/java/org/apache/struts2/components/Date.java
+++ b/core/src/main/java/org/apache/struts2/components/Date.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.TextProvider;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -143,7 +143,7 @@
@StrutsTag(name="date", tldBodyContent="empty", tldTagClass="org.apache.struts2.views.jsp.DateTag", description="Render a formatted date.")
public class Date extends ContextBean {
- private static final Logger LOG = LoggerFactory.getLogger(Date.class);
+ private static final Logger LOG = LogManager.getLogger(Date.class);
/**
* Property name to fall back when no format is specified
*/
diff --git a/core/src/main/java/org/apache/struts2/components/File.java b/core/src/main/java/org/apache/struts2/components/File.java
index 449ba1feb2..6d861820b2 100644
--- a/core/src/main/java/org/apache/struts2/components/File.java
+++ b/core/src/main/java/org/apache/struts2/components/File.java
@@ -28,8 +28,8 @@
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -52,7 +52,7 @@
description="Render a file input field",
allowDynamicAttributes=true)
public class File extends UIBean {
- private final static Logger LOG = LoggerFactory.getLogger(File.class);
+ private final static Logger LOG = LogManager.getLogger(File.class);
final public static String TEMPLATE = "file";
diff --git a/core/src/main/java/org/apache/struts2/components/I18n.java b/core/src/main/java/org/apache/struts2/components/I18n.java
index 82d991ef3d..82d690b87f 100644
--- a/core/src/main/java/org/apache/struts2/components/I18n.java
+++ b/core/src/main/java/org/apache/struts2/components/I18n.java
@@ -37,8 +37,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -89,7 +89,7 @@
" and place it on the value stack")
public class I18n extends Component {
- private static final Logger LOG = LoggerFactory.getLogger(I18n.class);
+ private static final Logger LOG = LogManager.getLogger(I18n.class);
protected boolean pushed;
protected String name;
diff --git a/core/src/main/java/org/apache/struts2/components/Include.java b/core/src/main/java/org/apache/struts2/components/Include.java
index 9a918f0978..fbc702f05d 100644
--- a/core/src/main/java/org/apache/struts2/components/Include.java
+++ b/core/src/main/java/org/apache/struts2/components/Include.java
@@ -49,8 +49,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -101,7 +101,7 @@
"(result of servlet or a JSP page)")
public class Include extends Component {
- private static final Logger LOG = LoggerFactory.getLogger(Include.class);
+ private static final Logger LOG = LogManager.getLogger(Include.class);
private static String systemEncoding = System.getProperty("file.encoding");
diff --git a/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java b/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java
index e5628fe246..0dcf7d08ee 100644
--- a/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java
+++ b/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java
@@ -31,8 +31,8 @@
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -75,7 +75,7 @@
@StrutsTag(name="inputtransferselect", tldTagClass="org.apache.struts2.views.jsp.ui.InputTransferSelectTag", description="Renders an input form")
public class InputTransferSelect extends ListUIBean {
- private static final Logger LOG = LoggerFactory.getLogger(InputTransferSelect.class);
+ private static final Logger LOG = LogManager.getLogger(InputTransferSelect.class);
private static final String TEMPLATE = "inputtransferselect";
diff --git a/core/src/main/java/org/apache/struts2/components/IteratorComponent.java b/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
index e2acee821f..45a8ee1e5b 100644
--- a/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
+++ b/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
@@ -22,8 +22,8 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.util.MakeIterator;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -225,7 +225,7 @@
*/
@StrutsTag(name="iterator", tldTagClass="org.apache.struts2.views.jsp.IteratorTag", description="Iterate over a iterable value")
public class IteratorComponent extends ContextBean {
- private static final Logger LOG = LoggerFactory.getLogger(IteratorComponent.class);
+ private static final Logger LOG = LogManager.getLogger(IteratorComponent.class);
protected Iterator iterator;
protected IteratorStatus status;
diff --git a/core/src/main/java/org/apache/struts2/components/MergeIterator.java b/core/src/main/java/org/apache/struts2/components/MergeIterator.java
index a0c8c2ae4f..f4aa31b152 100644
--- a/core/src/main/java/org/apache/struts2/components/MergeIterator.java
+++ b/core/src/main/java/org/apache/struts2/components/MergeIterator.java
@@ -33,8 +33,8 @@
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -133,7 +133,7 @@
"of a list of iterators into one iterator")
public class MergeIterator extends ContextBean implements UnnamedParametric {
- private static final Logger LOG = LoggerFactory.getLogger(MergeIterator.class);
+ private static final Logger LOG = LogManager.getLogger(MergeIterator.class);
private MergeIteratorFilter mergeIteratorFilter = null;
private List _parameters;
diff --git a/core/src/main/java/org/apache/struts2/components/Number.java b/core/src/main/java/org/apache/struts2/components/Number.java
index d89f45dedc..400ade82a5 100644
--- a/core/src/main/java/org/apache/struts2/components/Number.java
+++ b/core/src/main/java/org/apache/struts2/components/Number.java
@@ -26,8 +26,8 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -103,7 +103,7 @@
@StrutsTag(name = "number", tldBodyContent = "empty", tldTagClass = "org.apache.struts2.views.jsp.NumberTag", description = "Render a formatted number.")
public class Number extends ContextBean {
- private static final Logger LOG = LoggerFactory.getLogger(Number.class);
+ private static final Logger LOG = LogManager.getLogger(Number.class);
/**
* Property name to fall back when no format is specified
*/
diff --git a/core/src/main/java/org/apache/struts2/components/OptGroup.java b/core/src/main/java/org/apache/struts2/components/OptGroup.java
index 4eb3eb2b8f..d3e4d77081 100644
--- a/core/src/main/java/org/apache/struts2/components/OptGroup.java
+++ b/core/src/main/java/org/apache/struts2/components/OptGroup.java
@@ -34,8 +34,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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -79,7 +79,7 @@ public class OptGroup extends Component {
public static final String INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY = "optGroupInternalListUiBeanList";
- private static Logger LOG = LoggerFactory.getLogger(OptGroup.class);
+ private static Logger LOG = LogManager.getLogger(OptGroup.class);
protected HttpServletRequest req;
protected HttpServletResponse res;
diff --git a/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java b/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java
index 2bac1bb8ea..68a3f2bb36 100644
--- a/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java
+++ b/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java
@@ -22,8 +22,8 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -94,7 +94,7 @@
@StrutsTag(name="optiontransferselect", tldTagClass="org.apache.struts2.views.jsp.ui.OptionTransferSelectTag", description="Renders an input form")
public class OptionTransferSelect extends DoubleListUIBean {
- private static final Logger LOG = LoggerFactory.getLogger(OptionTransferSelect.class);
+ private static final Logger LOG = LogManager.getLogger(OptionTransferSelect.class);
private static final String TEMPLATE = "optiontransferselect";
diff --git a/core/src/main/java/org/apache/struts2/components/Property.java b/core/src/main/java/org/apache/struts2/components/Property.java
index a01147c1f1..5019b55e40 100644
--- a/core/src/main/java/org/apache/struts2/components/Property.java
+++ b/core/src/main/java/org/apache/struts2/components/Property.java
@@ -22,8 +22,8 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -89,7 +89,7 @@
@StrutsTag(name="property", tldBodyContent="empty", tldTagClass="org.apache.struts2.views.jsp.PropertyTag",
description="Print out expression which evaluates against the stack")
public class Property extends Component {
- private static final Logger LOG = LoggerFactory.getLogger(Property.class);
+ private static final Logger LOG = LogManager.getLogger(Property.class);
public Property(ValueStack stack) {
super(stack);
diff --git a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
index 0b4e13ba65..4216ddb334 100644
--- a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
+++ b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
@@ -26,8 +26,8 @@
import com.opensymphony.xwork2.config.entities.ActionConfig;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
@@ -47,7 +47,7 @@ public class ServletUrlRenderer implements UrlRenderer {
/**
* Provide a logging instance.
*/
- private static final Logger LOG = LoggerFactory.getLogger(ServletUrlRenderer.class);
+ private static final Logger LOG = LogManager.getLogger(ServletUrlRenderer.class);
private ActionMapper actionMapper;
private UrlHelper urlHelper;
diff --git a/core/src/main/java/org/apache/struts2/components/Submit.java b/core/src/main/java/org/apache/struts2/components/Submit.java
index 5db4e11883..85fb0d2e6c 100644
--- a/core/src/main/java/org/apache/struts2/components/Submit.java
+++ b/core/src/main/java/org/apache/struts2/components/Submit.java
@@ -30,8 +30,8 @@
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -53,7 +53,7 @@
allowDynamicAttributes=true)
public class Submit extends FormButton {
- private static final Logger LOG = LoggerFactory.getLogger(Submit.class);
+ private static final Logger LOG = LogManager.getLogger(Submit.class);
final public static String OPEN_TEMPLATE = "submit";
final public static String TEMPLATE = "submit-close";
protected String src;
diff --git a/core/src/main/java/org/apache/struts2/components/Text.java b/core/src/main/java/org/apache/struts2/components/Text.java
index 146d58ff50..6ec0b39f75 100644
--- a/core/src/main/java/org/apache/struts2/components/Text.java
+++ b/core/src/main/java/org/apache/struts2/components/Text.java
@@ -22,8 +22,8 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.util.TextProviderHelper;
import org.apache.struts2.views.annotations.StrutsTag;
@@ -119,7 +119,7 @@
tldTagClass="org.apache.struts2.views.jsp.TextTag",
description="Render a I18n text message")
public class Text extends ContextBean implements Param.UnnamedParametric {
- private static final Logger LOG = LoggerFactory.getLogger(Text.class);
+ private static final Logger LOG = LogManager.getLogger(Text.class);
protected List values = Collections.EMPTY_LIST;
protected String actualName;
diff --git a/core/src/main/java/org/apache/struts2/components/UIBean.java b/core/src/main/java/org/apache/struts2/components/UIBean.java
index 5fd99a9b85..8c9ebf6bbe 100644
--- a/core/src/main/java/org/apache/struts2/components/UIBean.java
+++ b/core/src/main/java/org/apache/struts2/components/UIBean.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.config.ConfigurationException;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsException;
import org.apache.struts2.components.template.Template;
@@ -434,7 +434,7 @@
*
*/
public abstract class UIBean extends Component {
- private static final Logger LOG = LoggerFactory.getLogger(UIBean.class);
+ private static final Logger LOG = LogManager.getLogger(UIBean.class);
protected HttpServletRequest request;
protected HttpServletResponse response;
diff --git a/core/src/main/java/org/apache/struts2/components/URL.java b/core/src/main/java/org/apache/struts2/components/URL.java
index 850bcce75d..a163acbcf0 100644
--- a/core/src/main/java/org/apache/struts2/components/URL.java
+++ b/core/src/main/java/org/apache/struts2/components/URL.java
@@ -23,8 +23,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -110,7 +110,7 @@
*/
@StrutsTag(name="url", tldTagClass="org.apache.struts2.views.jsp.URLTag", description="This tag is used to create a URL")
public class URL extends ContextBean {
- private static final Logger LOG = LoggerFactory.getLogger(URL.class);
+ private static final Logger LOG = LogManager.getLogger(URL.class);
private UrlProvider urlProvider;
private UrlRenderer urlRenderer;
diff --git a/core/src/main/java/org/apache/struts2/components/UpDownSelect.java b/core/src/main/java/org/apache/struts2/components/UpDownSelect.java
index af24bf9368..c2a2694adb 100644
--- a/core/src/main/java/org/apache/struts2/components/UpDownSelect.java
+++ b/core/src/main/java/org/apache/struts2/components/UpDownSelect.java
@@ -31,8 +31,8 @@
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -82,7 +82,7 @@
description="Create a Select component with buttons to move the elements in the select component up and down")
public class UpDownSelect extends Select {
- private static final Logger LOG = LoggerFactory.getLogger(UpDownSelect.class);
+ private static final Logger LOG = LogManager.getLogger(UpDownSelect.class);
final public static String TEMPLATE = "updownselect";
diff --git a/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java b/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java
index 0f3df8dd5e..cf7414acab 100644
--- a/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java
+++ b/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java
@@ -22,8 +22,8 @@
package org.apache.struts2.components.template;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import javax.servlet.ServletContext;
@@ -42,7 +42,7 @@
*/
public abstract class BaseTemplateEngine implements TemplateEngine {
- private static final Logger LOG = LoggerFactory.getLogger(BaseTemplateEngine.class);
+ private static final Logger LOG = LogManager.getLogger(BaseTemplateEngine.class);
/**
* The default theme properties file name. Default is 'theme.properties'
diff --git a/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java b/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
index 9368ec7163..478eb53a07 100644
--- a/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
+++ b/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
@@ -39,8 +39,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import freemarker.template.Configuration;
import freemarker.template.SimpleHash;
@@ -65,7 +65,7 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
}
}
- private static final Logger LOG = LoggerFactory.getLogger(FreemarkerTemplateEngine.class);
+ private static final Logger LOG = LogManager.getLogger(FreemarkerTemplateEngine.class);
@Inject
public void setFreemarkerManager(FreemarkerManager mgr) {
diff --git a/core/src/main/java/org/apache/struts2/components/template/JspTemplateEngine.java b/core/src/main/java/org/apache/struts2/components/template/JspTemplateEngine.java
index 8a7d299f19..95b4ed64bc 100644
--- a/core/src/main/java/org/apache/struts2/components/template/JspTemplateEngine.java
+++ b/core/src/main/java/org/apache/struts2/components/template/JspTemplateEngine.java
@@ -34,14 +34,14 @@
import org.apache.struts2.components.UIBean;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* JSP based template engine.
*/
public class JspTemplateEngine extends BaseTemplateEngine {
- private static final Logger LOG = LoggerFactory.getLogger(JspTemplateEngine.class);
+ private static final Logger LOG = LogManager.getLogger(JspTemplateEngine.class);
String encoding;
diff --git a/core/src/main/java/org/apache/struts2/components/template/VelocityTemplateEngine.java b/core/src/main/java/org/apache/struts2/components/template/VelocityTemplateEngine.java
index 4c665fe73c..87fc2b8bb1 100644
--- a/core/src/main/java/org/apache/struts2/components/template/VelocityTemplateEngine.java
+++ b/core/src/main/java/org/apache/struts2/components/template/VelocityTemplateEngine.java
@@ -36,14 +36,14 @@
import org.apache.velocity.context.Context;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Velocity based template engine.
*/
public class VelocityTemplateEngine extends BaseTemplateEngine {
- private static final Logger LOG = LoggerFactory.getLogger(VelocityTemplateEngine.class);
+ private static final Logger LOG = LogManager.getLogger(VelocityTemplateEngine.class);
private VelocityManager velocityManager;
diff --git a/core/src/main/java/org/apache/struts2/config/AbstractBeanSelectionProvider.java b/core/src/main/java/org/apache/struts2/config/AbstractBeanSelectionProvider.java
index 608d834715..a75b87765a 100644
--- a/core/src/main/java/org/apache/struts2/config/AbstractBeanSelectionProvider.java
+++ b/core/src/main/java/org/apache/struts2/config/AbstractBeanSelectionProvider.java
@@ -11,8 +11,8 @@
import com.opensymphony.xwork2.inject.Scope;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.location.LocatableProperties;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Properties;
@@ -21,7 +21,7 @@
*/
public abstract class AbstractBeanSelectionProvider implements BeanSelectionProvider {
- private static final Logger LOG = LoggerFactory.getLogger(AbstractBeanSelectionProvider.class);
+ private static final Logger LOG = LogManager.getLogger(AbstractBeanSelectionProvider.class);
public static final String DEFAULT_BEAN_NAME = "struts";
diff --git a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java b/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
index 3a6deb2fcd..671ea599b0 100644
--- a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
+++ b/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
@@ -56,8 +56,8 @@
import com.opensymphony.xwork2.util.TextParser;
import com.opensymphony.xwork2.util.ValueStackFactory;
import com.opensymphony.xwork2.util.location.LocatableProperties;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionContextFactory;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
import com.opensymphony.xwork2.validator.ActionValidatorManager;
@@ -357,7 +357,7 @@
*/
public class DefaultBeanSelectionProvider extends AbstractBeanSelectionProvider {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultBeanSelectionProvider.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultBeanSelectionProvider.class);
public void register(ContainerBuilder builder, LocatableProperties props) {
alias(ObjectFactory.class, StrutsConstants.STRUTS_OBJECTFACTORY, builder, props);
diff --git a/core/src/main/java/org/apache/struts2/config/DefaultSettings.java b/core/src/main/java/org/apache/struts2/config/DefaultSettings.java
index 7f21e4cac6..cc30f486c1 100644
--- a/core/src/main/java/org/apache/struts2/config/DefaultSettings.java
+++ b/core/src/main/java/org/apache/struts2/config/DefaultSettings.java
@@ -22,8 +22,8 @@
package org.apache.struts2.config;
import com.opensymphony.xwork2.util.location.Location;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import java.util.ArrayList;
@@ -38,7 +38,7 @@
*/
public class DefaultSettings implements Settings {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultSettings.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultSettings.class);
/**
* The Settings object that handles API calls.
diff --git a/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java b/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
index 333608bbe1..3bbf9b40e4 100644
--- a/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
+++ b/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.util.location.LocatableProperties;
import com.opensymphony.xwork2.util.location.Location;
import com.opensymphony.xwork2.util.location.LocationImpl;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsException;
import java.io.IOException;
@@ -40,7 +40,7 @@
*/
class PropertiesSettings implements Settings {
- private static final Logger LOG = LoggerFactory.getLogger(PropertiesSettings.class);
+ private static final Logger LOG = LogManager.getLogger(PropertiesSettings.class);
private LocatableProperties settings;
diff --git a/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
index cf055f9801..f09d6f38ee 100644
--- a/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
+++ b/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
@@ -40,15 +40,15 @@
import com.opensymphony.xwork2.inject.Context;
import com.opensymphony.xwork2.inject.Factory;
import com.opensymphony.xwork2.util.location.LocatableProperties;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Override Xwork class so we can use an arbitrary config file
*/
public class StrutsXmlConfigurationProvider extends XmlConfigurationProvider {
- private static final Logger LOG = LoggerFactory.getLogger(StrutsXmlConfigurationProvider.class);
+ private static final Logger LOG = LogManager.getLogger(StrutsXmlConfigurationProvider.class);
private File baseDir = null;
private String filename;
private String reloadKey;
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/ActionContextCleanUp.java b/core/src/main/java/org/apache/struts2/dispatcher/ActionContextCleanUp.java
index bc8032d2d1..8664b6422b 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/ActionContextCleanUp.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/ActionContextCleanUp.java
@@ -22,8 +22,8 @@
package org.apache.struts2.dispatcher;
import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
import javax.servlet.Filter;
@@ -70,7 +70,7 @@
*/
public class ActionContextCleanUp implements Filter {
- private static final Logger LOG = LoggerFactory.getLogger(ActionContextCleanUp.class);
+ private static final Logger LOG = LogManager.getLogger(ActionContextCleanUp.class);
private static final String COUNTER = "__cleanup_recursion_counter";
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java b/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java
index c093402f14..2b4061c92d 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java
@@ -3,8 +3,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.location.Location;
import com.opensymphony.xwork2.util.location.LocationUtils;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import freemarker.template.Template;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsException;
@@ -26,7 +26,7 @@
*/
public class DefaultDispatcherErrorHandler implements DispatcherErrorHandler {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultDispatcherErrorHandler.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultDispatcherErrorHandler.class);
private FreemarkerManager freemarkerManager;
private boolean devMode;
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java b/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java
index c62282fccb..d6004ebd62 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java
@@ -22,8 +22,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.dispatcher.ng.HostConfig;
@@ -66,7 +66,7 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
/**
* Provide a logging instance.
*/
- private Logger LOG = LoggerFactory.getLogger(DefaultStaticContentLoader.class);
+ private Logger LOG = LogManager.getLogger(DefaultStaticContentLoader.class);
/**
* Store set of path prefixes to use with static resources.
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
index 3a4e30570e..d01d6e7b71 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
@@ -38,8 +38,8 @@
import com.opensymphony.xwork2.util.location.LocatableProperties;
import com.opensymphony.xwork2.util.location.Location;
import com.opensymphony.xwork2.util.location.LocationUtils;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
@@ -77,7 +77,7 @@ public class Dispatcher {
/**
* Provide a logging instance.
*/
- private static final Logger LOG = LoggerFactory.getLogger(Dispatcher.class);
+ private static final Logger LOG = LogManager.getLogger(Dispatcher.class);
/**
* Provide a thread local instance.
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java b/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
index 22fc05177d..715ad94a76 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
@@ -28,8 +28,9 @@
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
-import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
import org.apache.struts2.RequestUtils;
import org.apache.struts2.StrutsStatics;
@@ -199,6 +200,7 @@ public void init(FilterConfig filterConfig) throws ServletException {
}
}
+ @Deprecated
private void initLogging() {
String factoryName = filterConfig.getInitParameter("loggerFactory");
if (factoryName != null) {
@@ -218,7 +220,7 @@ private void initLogging() {
}
}
- log = LoggerFactory.getLogger(FilterDispatcher.class);
+ log = LogManager.getLogger(FilterDispatcher.class);
}
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcherCompatWeblogic61.java b/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcherCompatWeblogic61.java
index c46dc4b974..6598d7142b 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcherCompatWeblogic61.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcherCompatWeblogic61.java
@@ -29,8 +29,8 @@
import org.apache.struts2.config.ServletContextSingleton;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
@@ -52,7 +52,7 @@
*/
public class FilterDispatcherCompatWeblogic61 extends FilterDispatcher {
- private static Logger LOG = LoggerFactory.getLogger(FilterDispatcherCompatWeblogic61.class);
+ private static Logger LOG = LogManager.getLogger(FilterDispatcherCompatWeblogic61.class);
/**
* dummy setter for {@link #filterConfig}; this method
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java b/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
index b4ad906718..1f07c425f1 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
@@ -26,8 +26,8 @@
import com.opensymphony.xwork2.Result;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import javax.servlet.http.HttpServletResponse;
@@ -80,7 +80,7 @@
public class HttpHeaderResult implements Result {
private static final long serialVersionUID = 195648957144219214L;
- private static final Logger LOG = LoggerFactory.getLogger(HttpHeaderResult.class);
+ private static final Logger LOG = LogManager.getLogger(HttpHeaderResult.class);
/**
* This result type doesn't have a default param, null is ok to reduce noice in logs
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/PlainTextResult.java b/core/src/main/java/org/apache/struts2/dispatcher/PlainTextResult.java
index fc14aab112..38259eb3c3 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/PlainTextResult.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/PlainTextResult.java
@@ -22,8 +22,8 @@
package org.apache.struts2.dispatcher;
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletResponse;
@@ -77,7 +77,7 @@ public class PlainTextResult extends StrutsResultSupport {
public static final int BUFFER_SIZE = 1024;
- private static final Logger LOG = LoggerFactory.getLogger(PlainTextResult.class);
+ private static final Logger LOG = LogManager.getLogger(PlainTextResult.class);
private static final long serialVersionUID = 3633371605905583950L;
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/ServletDispatcherResult.java b/core/src/main/java/org/apache/struts2/dispatcher/ServletDispatcherResult.java
index 3550a8eea0..6cd5eb1399 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/ServletDispatcherResult.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/ServletDispatcherResult.java
@@ -23,8 +23,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.ServletActionContext;
@@ -95,7 +95,7 @@ public class ServletDispatcherResult extends StrutsResultSupport {
private static final long serialVersionUID = -1970659272360685627L;
- private static final Logger LOG = LoggerFactory.getLogger(ServletDispatcherResult.class);
+ private static final Logger LOG = LogManager.getLogger(ServletDispatcherResult.class);
private UrlHelper urlHelper;
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java b/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java
index 786deef765..2293c59718 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionException;
import com.opensymphony.xwork2.util.reflection.ReflectionExceptionHandler;
import org.apache.struts2.ServletActionContext;
@@ -100,7 +100,7 @@ public class ServletRedirectResult extends StrutsResultSupport implements Reflec
private static final long serialVersionUID = 6316947346435301270L;
- private static final Logger LOG = LoggerFactory.getLogger(ServletRedirectResult.class);
+ private static final Logger LOG = LogManager.getLogger(ServletRedirectResult.class);
protected boolean prependServletContext = true;
protected ActionMapper actionMapper;
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java b/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java
index 66a17c95ec..05236ec2fc 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java
@@ -27,8 +27,8 @@
import javax.servlet.http.HttpServletResponse;
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.ValueStack;
/**
@@ -91,7 +91,7 @@ public class StreamResult extends StrutsResultSupport {
private static final long serialVersionUID = -1468409635999059850L;
- protected static final Logger LOG = LoggerFactory.getLogger(StreamResult.class);
+ protected static final Logger LOG = LogManager.getLogger(StreamResult.class);
public static final String DEFAULT_PARAM = "inputName";
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java b/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java
index bbcffa3b2b..b7d57baa77 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java
@@ -31,8 +31,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
@@ -105,7 +105,7 @@
*/
public abstract class StrutsResultSupport implements Result, StrutsStatics {
- private static final Logger LOG = LoggerFactory.getLogger(StrutsResultSupport.class);
+ private static final Logger LOG = LogManager.getLogger(StrutsResultSupport.class);
/** The default parameter */
public static final String DEFAULT_PARAM = "location";
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java b/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java
index 8b37b6c181..2a00ad9aee 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java
@@ -25,8 +25,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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.JspSupportServlet;
@@ -85,7 +85,7 @@ public class VelocityResult extends StrutsResultSupport {
private static final long serialVersionUID = 7268830767762559424L;
- private static final Logger LOG = LoggerFactory.getLogger(VelocityResult.class);
+ private static final Logger LOG = LogManager.getLogger(VelocityResult.class);
private String defaultEncoding;
private VelocityManager velocityManager;
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
index 654fb1dead..17a4611356 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
@@ -24,8 +24,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import javax.servlet.http.HttpServletRequest;
@@ -47,7 +47,7 @@
*/
public class CompositeActionMapper implements ActionMapper {
- private static final Logger LOG = LoggerFactory.getLogger(CompositeActionMapper.class);
+ private static final Logger LOG = LogManager.getLogger(CompositeActionMapper.class);
protected List actionMappers = new LinkedList();
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
index a7a1a69408..1370d0e93a 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
@@ -27,8 +27,8 @@
import com.opensymphony.xwork2.config.entities.PackageConfig;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.RequestUtils;
import org.apache.struts2.ServletActionContext;
@@ -110,7 +110,7 @@
*/
public class DefaultActionMapper implements ActionMapper {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultActionMapper.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultActionMapper.class);
protected static final String METHOD_PREFIX = "method:";
protected static final String ACTION_PREFIX = "action:";
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java
index 0abfaeb973..f43d8025ec 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java
@@ -3,8 +3,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.RequestUtils;
import org.apache.struts2.StrutsConstants;
@@ -41,7 +41,7 @@
*/
public class PrefixBasedActionMapper extends DefaultActionMapper implements ActionMapper {
- private static final Logger LOG = LoggerFactory.getLogger(PrefixBasedActionMapper.class);
+ private static final Logger LOG = LogManager.getLogger(PrefixBasedActionMapper.class);
protected Container container;
protected Map actionMappers = new HashMap();
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
index 3f08e84a96..d00d797f3c 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
@@ -23,8 +23,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import javax.servlet.http.HttpServletRequest;
@@ -38,7 +38,7 @@
*/
public class Restful2ActionMapper extends DefaultActionMapper {
- protected static final Logger LOG = LoggerFactory.getLogger(Restful2ActionMapper.class);
+ protected static final Logger LOG = LogManager.getLogger(Restful2ActionMapper.class);
public static final String HTTP_METHOD_PARAM = "__http_method";
private String idParameterName = null;
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
index b2378f40cf..7af01c33b8 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
@@ -22,8 +22,8 @@
package org.apache.struts2.dispatcher.mapper;
import com.opensymphony.xwork2.config.ConfigurationManager;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.RequestUtils;
import javax.servlet.http.HttpServletRequest;
@@ -38,7 +38,7 @@
* http://struts.apache.org/2.x/docs/restfulactionmapper.html
*/
public class RestfulActionMapper implements ActionMapper {
- protected static final Logger LOG = LoggerFactory.getLogger(RestfulActionMapper.class);
+ protected static final Logger LOG = LogManager.getLogger(RestfulActionMapper.class);
/* (non-Javadoc)
* @see org.apache.struts2.dispatcher.mapper.ActionMapper#getMapping(javax.servlet.http.HttpServletRequest)
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
index eecec0e5b6..5e1d19dacf 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.LocaleProvider;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadBase;
import org.apache.commons.fileupload.FileUploadException;
@@ -54,7 +54,7 @@
*/
public class JakartaMultiPartRequest implements MultiPartRequest {
- static final Logger LOG = LoggerFactory.getLogger(JakartaMultiPartRequest.class);
+ static final Logger LOG = LogManager.getLogger(JakartaMultiPartRequest.class);
// maps parameter name -> List of FileItem objects
protected Map> files = new HashMap>();
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java
index 6fbd2c34ed..e0c52947d2 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java
@@ -3,8 +3,8 @@
import com.opensymphony.xwork2.LocaleProvider;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.fileupload.FileItemIterator;
import org.apache.commons.fileupload.FileItemStream;
import org.apache.commons.fileupload.FileUploadBase;
@@ -40,7 +40,7 @@
*/
public class JakartaStreamMultiPartRequest implements MultiPartRequest {
- static final Logger LOG = LoggerFactory.getLogger(JakartaStreamMultiPartRequest.class);
+ static final Logger LOG = LogManager.getLogger(JakartaStreamMultiPartRequest.class);
/**
* Defines the internal buffer size used during streaming operations.
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
index ddc4275194..6c4b0793b9 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.DefaultLocaleProvider;
import com.opensymphony.xwork2.LocaleProvider;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.dispatcher.StrutsRequestWrapper;
import javax.servlet.http.HttpServletRequest;
@@ -58,7 +58,7 @@
*/
public class MultiPartRequestWrapper extends StrutsRequestWrapper {
- protected static final Logger LOG = LoggerFactory.getLogger(MultiPartRequestWrapper.class);
+ protected static final Logger LOG = LogManager.getLogger(MultiPartRequestWrapper.class);
private Collection errors;
private MultiPartRequest multi;
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/ng/InitOperations.java b/core/src/main/java/org/apache/struts2/dispatcher/ng/InitOperations.java
index 6bce2b6033..e0c4316809 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/ng/InitOperations.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/ng/InitOperations.java
@@ -23,6 +23,7 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.StaticContentLoader;
@@ -46,6 +47,7 @@ public InitOperations() {
/**
* Initializes the internal Struts logging
*/
+ @Deprecated
public void initLogging( HostConfig filterConfig ) {
String factoryName = filterConfig.getInitParameter("loggerFactory");
if (factoryName != null) {
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/ng/PrepareOperations.java b/core/src/main/java/org/apache/struts2/dispatcher/ng/PrepareOperations.java
index ccf21c7c1b..bb60ce4c8e 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/ng/PrepareOperations.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/ng/PrepareOperations.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.RequestUtils;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.Dispatcher;
@@ -45,12 +45,12 @@
*/
public class PrepareOperations {
- private static final Logger LOG = LoggerFactory.getLogger(PrepareOperations.class);
+ private static final Logger LOG = LogManager.getLogger(PrepareOperations.class);
private Dispatcher dispatcher;
private static final String STRUTS_ACTION_MAPPING_KEY = "struts.actionMapping";
public static final String CLEANUP_RECURSION_COUNTER = "__cleanup_recursion_counter";
- private Logger log = LoggerFactory.getLogger(PrepareOperations.class);
+ private Logger log = LogManager.getLogger(PrepareOperations.class);
@Deprecated
public PrepareOperations(ServletContext servletContext, Dispatcher dispatcher) {
diff --git a/core/src/main/java/org/apache/struts2/impl/PrefixBasedActionProxyFactory.java b/core/src/main/java/org/apache/struts2/impl/PrefixBasedActionProxyFactory.java
index afbb189ba5..56f86e5d5a 100644
--- a/core/src/main/java/org/apache/struts2/impl/PrefixBasedActionProxyFactory.java
+++ b/core/src/main/java/org/apache/struts2/impl/PrefixBasedActionProxyFactory.java
@@ -5,8 +5,8 @@
import com.opensymphony.xwork2.DefaultActionProxyFactory;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import java.util.HashMap;
@@ -33,7 +33,7 @@
*/
public class PrefixBasedActionProxyFactory extends DefaultActionProxyFactory {
- private static final Logger LOG = LoggerFactory.getLogger(PrefixBasedActionProxyFactory.class);
+ private static final Logger LOG = LogManager.getLogger(PrefixBasedActionProxyFactory.class);
private Map actionProxyFactories = new HashMap();
private ActionProxyFactory defaultFactory;
diff --git a/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java
index b611ebc2d6..5042008bb6 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java
@@ -22,8 +22,8 @@
package org.apache.struts2.interceptor;
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import java.util.Map;
@@ -55,7 +55,7 @@ public class CheckboxInterceptor extends AbstractInterceptor {
private String uncheckedValue = Boolean.FALSE.toString();
- private static final Logger LOG = LoggerFactory.getLogger(CheckboxInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(CheckboxInterceptor.class);
public String intercept(ActionInvocation ai) throws Exception {
Map parameters = ai.getInvocationContext().getParameters();
diff --git a/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java
index 6e44570b8c..cf2d797c69 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java
@@ -26,8 +26,8 @@
import com.opensymphony.xwork2.ActionContext;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -77,7 +77,7 @@ public class ClearSessionInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = -2102199238428329238L;
- private static final Logger LOG = LoggerFactory.getLogger(ClearSessionInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ClearSessionInterceptor.class);
/* (non-Javadoc)
* @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation)
diff --git a/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java
index 06c4c30ed7..74e104b2f0 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java
@@ -29,8 +29,8 @@
import com.opensymphony.xwork2.security.ExcludedPatternsChecker;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import javax.servlet.http.Cookie;
@@ -167,7 +167,7 @@ public class CookieInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = 4153142432948747305L;
- private static final Logger LOG = LoggerFactory.getLogger(CookieInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(CookieInterceptor.class);
private static final String ACCEPTED_PATTERN = "[a-zA-Z0-9\\.\\]\\[_'\\s]+";
diff --git a/core/src/main/java/org/apache/struts2/interceptor/CookieProviderInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CookieProviderInterceptor.java
index 88d829cb28..f2798a0916 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/CookieProviderInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/CookieProviderInterceptor.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.interceptor.PreResultListener;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsStatics;
import javax.servlet.http.Cookie;
@@ -68,7 +68,7 @@
*/
public class CookieProviderInterceptor extends AbstractInterceptor implements PreResultListener {
- private static final Logger LOG = LoggerFactory.getLogger(CookieProviderInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(CookieProviderInterceptor.class);
public String intercept(ActionInvocation invocation) throws Exception {
invocation.addPreResultListener(this);
diff --git a/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java
index 39a702445b..89251f4589 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java
@@ -23,8 +23,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.SessionMap;
@@ -83,7 +83,7 @@ public class CreateSessionInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = -4590322556118858869L;
- private static final Logger LOG = LoggerFactory.getLogger(CreateSessionInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(CreateSessionInterceptor.class);
/* (non-Javadoc)
diff --git a/core/src/main/java/org/apache/struts2/interceptor/DateTextFieldInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/DateTextFieldInterceptor.java
index f5bda69be0..cef69051f2 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/DateTextFieldInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/DateTextFieldInterceptor.java
@@ -11,12 +11,12 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
public class DateTextFieldInterceptor implements Interceptor {
- private static final Logger LOG = LoggerFactory.getLogger(DateTextFieldInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(DateTextFieldInterceptor.class);
public static enum DateWord {
diff --git a/core/src/main/java/org/apache/struts2/interceptor/DeprecationInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/DeprecationInterceptor.java
index bf4d17f4b7..16974d8ec2 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/DeprecationInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/DeprecationInterceptor.java
@@ -5,8 +5,8 @@
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import java.lang.reflect.Field;
@@ -25,7 +25,7 @@
*/
public class DeprecationInterceptor extends AbstractInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(DeprecationInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(DeprecationInterceptor.class);
private Container container;
private boolean devMode;
diff --git a/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
index 7d8b5421fe..9d42dfb6c9 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
@@ -32,8 +32,8 @@
import com.opensymphony.xwork2.inject.Inject;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.util.TokenHelper;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.Dispatcher;
@@ -175,7 +175,7 @@ public class ExecuteAndWaitInterceptor extends MethodFilterInterceptor {
private static final long serialVersionUID = -2754639196749652512L;
- private static final Logger LOG = LoggerFactory.getLogger(ExecuteAndWaitInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ExecuteAndWaitInterceptor.class);
public static final String KEY = "__execWait";
public static final String WAIT = "wait";
diff --git a/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
index 78970a02e3..109f11aedf 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
@@ -32,8 +32,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.util.TextParseUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;
import org.apache.struts2.util.ContentTypeMatcher;
@@ -189,7 +189,7 @@ public class FileUploadInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = -4764627478894962478L;
- protected static final Logger LOG = LoggerFactory.getLogger(FileUploadInterceptor.class);
+ protected static final Logger LOG = LogManager.getLogger(FileUploadInterceptor.class);
protected Long maximumSize;
protected Set allowedTypesSet = Collections.emptySet();
diff --git a/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
index b7509f039a..3c358f58fe 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
@@ -32,8 +32,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -152,7 +152,7 @@ public class MessageStoreInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = 9161650888603380164L;
- private static final Logger LOG = LoggerFactory.getLogger(MessageStoreInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(MessageStoreInterceptor.class);
public static final String AUTOMATIC_MODE = "AUTOMATIC";
public static final String STORE_MODE = "STORE";
diff --git a/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java
index f55f1d2624..d7a515038b 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java
@@ -23,8 +23,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import javax.servlet.http.HttpServletRequest;
@@ -88,7 +88,7 @@
*/
public class RolesInterceptor extends AbstractInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(RolesInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(RolesInterceptor.class);
private boolean isProperlyConfigured = true;
diff --git a/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java
index 88638335b9..28cca41345 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java
@@ -35,8 +35,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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -144,7 +144,7 @@ public class ScopeInterceptor extends AbstractInterceptor implements PreResultLi
private static final long serialVersionUID = 9120762699600054395L;
- private static final Logger LOG = LoggerFactory.getLogger(ScopeInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ScopeInterceptor.class);
private String[] application = null;
private String[] session = null;
diff --git a/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
index 743a380ee7..7ff87995b5 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
@@ -50,8 +50,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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
/**
@@ -93,7 +93,7 @@ public class DebuggingInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = -3097324155953078783L;
- private final static Logger LOG = LoggerFactory.getLogger(DebuggingInterceptor.class);
+ private final static Logger LOG = LogManager.getLogger(DebuggingInterceptor.class);
private String[] ignorePrefixes = new String[]{"org.apache.struts.",
"com.opensymphony.xwork2.", "xwork."};
diff --git a/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java b/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java
index a597d64de8..1d005c2d6c 100644
--- a/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java
+++ b/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java
@@ -27,8 +27,8 @@
import java.util.StringTokenizer;
import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
@@ -38,7 +38,7 @@
*/
public class IteratorGenerator implements Iterator, Action {
- private static final Logger LOG = LoggerFactory.getLogger(IteratorGenerator.class);
+ private static final Logger LOG = LogManager.getLogger(IteratorGenerator.class);
List values;
Object value;
diff --git a/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java b/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java
index aef043d874..f57b5e6b2c 100644
--- a/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java
+++ b/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java
@@ -28,7 +28,7 @@
import java.util.List;
import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
/**
@@ -67,7 +67,7 @@ public String execute() {
} else {
try {
if (!MakeIterator.isIterable(source)) {
- LoggerFactory.getLogger(SortIteratorFilter.class.getName()).warn("Cannot create SortIterator for source " + source);
+ LogManager.getLogger(SortIteratorFilter.class.getName()).warn("Cannot create SortIterator for source " + source);
return ERROR;
}
@@ -86,7 +86,7 @@ public String execute() {
return SUCCESS;
} catch (Exception e) {
- LoggerFactory.getLogger(SortIteratorFilter.class.getName()).warn("Error creating sort iterator.", e);
+ LogManager.getLogger(SortIteratorFilter.class.getName()).warn("Error creating sort iterator.", e);
return ERROR;
}
diff --git a/core/src/main/java/org/apache/struts2/util/StrutsUtil.java b/core/src/main/java/org/apache/struts2/util/StrutsUtil.java
index 38aa3f3b75..c0fcbdee94 100644
--- a/core/src/main/java/org/apache/struts2/util/StrutsUtil.java
+++ b/core/src/main/java/org/apache/struts2/util/StrutsUtil.java
@@ -27,8 +27,8 @@
import com.opensymphony.xwork2.util.ClassLoaderUtil;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.views.jsp.ui.OgnlTool;
import org.apache.struts2.views.util.UrlHelper;
@@ -54,7 +54,7 @@
*/
public class StrutsUtil {
- protected static final Logger LOG = LoggerFactory.getLogger(StrutsUtil.class);
+ protected static final Logger LOG = LogManager.getLogger(StrutsUtil.class);
protected HttpServletRequest request;
protected HttpServletResponse response;
diff --git a/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java b/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java
index 3b8ac4a104..cacdd1c1dc 100644
--- a/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java
+++ b/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java
@@ -22,8 +22,8 @@
package org.apache.struts2.util;
import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.ArrayList;
import java.util.Iterator;
@@ -36,7 +36,7 @@
*/
public class SubsetIteratorFilter extends IteratorFilterSupport implements Iterator, Action {
- private static final Logger LOG = LoggerFactory.getLogger(SubsetIteratorFilter.class);
+ private static final Logger LOG = LogManager.getLogger(SubsetIteratorFilter.class);
Iterator iterator;
Object source;
@@ -69,7 +69,7 @@ public void setDecider(Decider aDecider) {
// Action implementation -----------------------------------------
public String execute() {
if (source == null) {
- LoggerFactory.getLogger(SubsetIteratorFilter.class.getName()).warn("Source is null returning empty set.");
+ LogManager.getLogger(SubsetIteratorFilter.class.getName()).warn("Source is null returning empty set.");
return ERROR;
}
diff --git a/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java b/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java
index 303addec9e..6449667c5c 100644
--- a/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java
+++ b/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.TextProvider;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Collections;
import java.util.List;
@@ -34,7 +34,7 @@
*/
public class TextProviderHelper {
- private static final Logger LOG = LoggerFactory.getLogger(TextProviderHelper.class);
+ private static final Logger LOG = LogManager.getLogger(TextProviderHelper.class);
/**
* Get a message from the first TextProvider encountered in the stack.
diff --git a/core/src/main/java/org/apache/struts2/util/TokenHelper.java b/core/src/main/java/org/apache/struts2/util/TokenHelper.java
index 2e103da624..c19a3baef9 100644
--- a/core/src/main/java/org/apache/struts2/util/TokenHelper.java
+++ b/core/src/main/java/org/apache/struts2/util/TokenHelper.java
@@ -23,8 +23,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.math.BigInteger;
import java.security.SecureRandom;
@@ -51,7 +51,7 @@ public class TokenHelper {
* The name of the field which will hold the token name
*/
public static final String TOKEN_NAME_FIELD = "struts.token.name";
- private static final Logger LOG = LoggerFactory.getLogger(TokenHelper.class);
+ private static final Logger LOG = LogManager.getLogger(TokenHelper.class);
private static final Random RANDOM = new SecureRandom();
diff --git a/core/src/main/java/org/apache/struts2/util/fs/JBossFileManager.java b/core/src/main/java/org/apache/struts2/util/fs/JBossFileManager.java
index b4a2b15244..10881e92ce 100644
--- a/core/src/main/java/org/apache/struts2/util/fs/JBossFileManager.java
+++ b/core/src/main/java/org/apache/struts2/util/fs/JBossFileManager.java
@@ -4,8 +4,8 @@
import com.opensymphony.xwork2.util.fs.FileRevision;
import com.opensymphony.xwork2.util.fs.JarEntryRevision;
import com.opensymphony.xwork2.util.fs.Revision;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.File;
import java.io.IOException;
@@ -22,7 +22,7 @@
*/
public class JBossFileManager extends DefaultFileManager {
- private static final Logger LOG = LoggerFactory.getLogger(JBossFileManager.class);
+ private static final Logger LOG = LogManager.getLogger(JBossFileManager.class);
private static final String JBOSS5_VFS = "vfs";
private static final String JBOSS5_VFSZIP = "vfszip";
diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
index a99235e2d6..28b7a5fb13 100644
--- a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
+++ b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
@@ -27,8 +27,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import freemarker.cache.ClassTemplateLoader;
import freemarker.cache.FileTemplateLoader;
import freemarker.cache.MultiTemplateLoader;
@@ -158,7 +158,7 @@ public class FreemarkerManager {
// end freemarker definitions...
- private static final Logger LOG = LoggerFactory.getLogger(FreemarkerManager.class);
+ private static final Logger LOG = LogManager.getLogger(FreemarkerManager.class);
public static final String CONFIG_SERVLET_CONTEXT_KEY = "freemarker.Configuration";
public static final String KEY_EXCEPTION = "exception";
diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
index 3ded53ba32..e5258e6e09 100644
--- a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
+++ b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
@@ -26,8 +26,8 @@
import com.opensymphony.xwork2.LocaleProvider;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import freemarker.template.Configuration;
import freemarker.template.ObjectWrapper;
import freemarker.template.Template;
@@ -104,7 +104,7 @@ public class FreemarkerResult extends StrutsResultSupport {
private static final long serialVersionUID = -3778230771704661631L;
- private static final Logger LOG = LoggerFactory.getLogger(FreemarkerResult.class);
+ private static final Logger LOG = LogManager.getLogger(FreemarkerResult.class);
protected ActionInvocation invocation;
protected Configuration configuration;
diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java b/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java
index 3b3565c5df..bf1495bfeb 100644
--- a/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java
+++ b/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java
@@ -24,8 +24,8 @@
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 org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import freemarker.ext.beans.BeansWrapper;
import freemarker.template.SimpleNumber;
import freemarker.template.SimpleSequence;
@@ -43,7 +43,7 @@
import java.util.Map;
public abstract class TagModel implements TemplateTransformModel {
- private static final Logger LOG = LoggerFactory.getLogger(TagModel.class);
+ private static final Logger LOG = LogManager.getLogger(TagModel.class);
protected ValueStack stack;
protected HttpServletRequest req;
diff --git a/core/src/main/java/org/apache/struts2/views/jsp/BeanTag.java b/core/src/main/java/org/apache/struts2/views/jsp/BeanTag.java
index 5c21421a76..f63058084a 100644
--- a/core/src/main/java/org/apache/struts2/views/jsp/BeanTag.java
+++ b/core/src/main/java/org/apache/struts2/views/jsp/BeanTag.java
@@ -28,8 +28,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
@@ -39,7 +39,7 @@ public class BeanTag extends ContextBeanTag {
private static final long serialVersionUID = -3863152522071209267L;
- protected static Logger LOG = LoggerFactory.getLogger(BeanTag.class);
+ protected static Logger LOG = LogManager.getLogger(BeanTag.class);
protected String name;
diff --git a/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java b/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
index 76371a9aa9..81ac85ce65 100644
--- a/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
+++ b/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
@@ -29,8 +29,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
@@ -134,7 +134,7 @@ public class IteratorGeneratorTag extends StrutsBodyTagSupport {
public static final String DEFAULT_SEPARATOR = ",";
- private static final Logger LOG = LoggerFactory.getLogger(IteratorGeneratorTag.class);
+ private static final Logger LOG = LogManager.getLogger(IteratorGeneratorTag.class);
String countAttr;
String separatorAttr;
diff --git a/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java b/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java
index 196b8b0c54..0149f594e3 100644
--- a/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java
+++ b/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java
@@ -29,8 +29,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
@@ -155,7 +155,7 @@ public class SubsetIteratorTag extends StrutsBodyTagSupport {
private static final long serialVersionUID = -6252696081713080102L;
- private static final Logger LOG = LoggerFactory.getLogger(SubsetIteratorTag.class);
+ private static final Logger LOG = LogManager.getLogger(SubsetIteratorTag.class);
String countAttr;
String sourceAttr;
diff --git a/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITagBeanInfo.java b/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITagBeanInfo.java
index 21c5d00296..aa6379d0c8 100644
--- a/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITagBeanInfo.java
+++ b/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITagBeanInfo.java
@@ -21,8 +21,8 @@
package org.apache.struts2.views.jsp.ui;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
@@ -37,7 +37,7 @@
*/
public class AbstractUITagBeanInfo extends SimpleBeanInfo {
- private static final Logger LOG = LoggerFactory.getLogger(AbstractUITagBeanInfo.class);
+ private static final Logger LOG = LogManager.getLogger(AbstractUITagBeanInfo.class);
@Override
public PropertyDescriptor[] getPropertyDescriptors() {
diff --git a/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java b/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java
index 460c138309..111f70b0d1 100644
--- a/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java
+++ b/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java
@@ -22,8 +22,8 @@
package org.apache.struts2.views.util;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.StrutsConstants;
@@ -45,7 +45,7 @@
*/
public class DefaultUrlHelper implements UrlHelper {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultUrlHelper.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultUrlHelper.class);
public static final String HTTP_PROTOCOL = "http";
public static final String HTTPS_PROTOCOL = "https";
diff --git a/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java b/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
index e026a2c68d..51aff4a34a 100644
--- a/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
+++ b/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
@@ -25,8 +25,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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
@@ -66,7 +66,7 @@
*
*/
public class VelocityManager {
- private static final Logger LOG = LoggerFactory.getLogger(VelocityManager.class);
+ private static final Logger LOG = LogManager.getLogger(VelocityManager.class);
public static final String STRUTS = "struts";
private ObjectFactory objectFactory;
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java b/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java
index 34b2446b94..5d1e567a46 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java
@@ -33,8 +33,8 @@
import org.w3c.dom.NodeList;
import org.w3c.dom.UserDataHandler;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* AbstractAdapterNode is the base for childAdapters that expose a read-only view
@@ -82,7 +82,7 @@ public Node removeNamedItemNS(String namespaceURI, String localName) throws DOME
};
private List childAdapters;
- private Logger log = LoggerFactory.getLogger(this.getClass());
+ private Logger log = LogManager.getLogger(this.getClass());
// The domain object that we are adapting
private Object propertyValue;
@@ -92,8 +92,8 @@ public Node removeNamedItemNS(String namespaceURI, String localName) throws DOME
public AbstractAdapterNode() {
- if (LoggerFactory.getLogger(getClass()).isDebugEnabled()) {
- LoggerFactory.getLogger(getClass()).debug("Creating " + this);
+ if (LogManager.getLogger(getClass()).isDebugEnabled()) {
+ LogManager.getLogger(getClass()).debug("Creating " + this);
}
}
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/ArrayAdapter.java b/core/src/main/java/org/apache/struts2/views/xslt/ArrayAdapter.java
index 48046505ca..75ad827f86 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/ArrayAdapter.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/ArrayAdapter.java
@@ -26,15 +26,15 @@
import org.w3c.dom.Node;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*/
public class ArrayAdapter extends AbstractAdapterElement {
- private Logger log = LoggerFactory.getLogger(this.getClass());
+ private Logger log = LogManager.getLogger(this.getClass());
public ArrayAdapter() {
}
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/BeanAdapter.java b/core/src/main/java/org/apache/struts2/views/xslt/BeanAdapter.java
index 043fc75d87..0b242e398c 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/BeanAdapter.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/BeanAdapter.java
@@ -21,8 +21,8 @@
package org.apache.struts2.views.xslt;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsException;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -65,7 +65,7 @@ public class BeanAdapter extends AbstractAdapterElement {
//~ Instance fields ////////////////////////////////////////////////////////
- private Logger log = LoggerFactory.getLogger(this.getClass());
+ private Logger log = LogManager.getLogger(this.getClass());
//~ Constructors ///////////////////////////////////////////////////////////
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/CollectionAdapter.java b/core/src/main/java/org/apache/struts2/views/xslt/CollectionAdapter.java
index e7f2727e9c..a720ccba55 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/CollectionAdapter.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/CollectionAdapter.java
@@ -27,15 +27,15 @@
import org.w3c.dom.Node;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*/
public class CollectionAdapter extends AbstractAdapterElement {
- private Logger log = LoggerFactory.getLogger(this.getClass());
+ private Logger log = LogManager.getLogger(this.getClass());
public CollectionAdapter() { }
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/ProxyElementAdapter.java b/core/src/main/java/org/apache/struts2/views/xslt/ProxyElementAdapter.java
index 18c6db3cc2..5c3389a2bf 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/ProxyElementAdapter.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/ProxyElementAdapter.java
@@ -31,8 +31,8 @@
import org.w3c.dom.NodeList;
import org.w3c.dom.TypeInfo;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* ProxyElementAdapter is a pass-through adapter for objects which already
@@ -45,7 +45,7 @@
*/
public class ProxyElementAdapter extends ProxyNodeAdapter implements Element {
- private Logger log = LoggerFactory.getLogger(this.getClass());
+ private Logger log = LogManager.getLogger(this.getClass());
public ProxyElementAdapter(AdapterFactory factory, AdapterNode parent, Element value) {
super(factory, parent, value);
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/ProxyNodeAdapter.java b/core/src/main/java/org/apache/struts2/views/xslt/ProxyNodeAdapter.java
index 72a1388006..26b23ee649 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/ProxyNodeAdapter.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/ProxyNodeAdapter.java
@@ -25,8 +25,8 @@
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* ProxyNodeAdapter is a read-only delegating adapter for objects which already
@@ -36,7 +36,7 @@
*/
public abstract class ProxyNodeAdapter extends AbstractAdapterNode {
- private Logger log = LoggerFactory.getLogger(this.getClass());
+ private Logger log = LogManager.getLogger(this.getClass());
public ProxyNodeAdapter(AdapterFactory factory, AdapterNode parent, Node value) {
setContext(factory, parent, "document"/*propname unused*/, value);
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/ServletURIResolver.java b/core/src/main/java/org/apache/struts2/views/xslt/ServletURIResolver.java
index 8b4d39c46b..0496c4db75 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/ServletURIResolver.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/ServletURIResolver.java
@@ -29,8 +29,8 @@
import javax.xml.transform.URIResolver;
import javax.xml.transform.stream.StreamSource;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
@@ -42,7 +42,7 @@
*/
public class ServletURIResolver implements URIResolver {
- private Logger log = LoggerFactory.getLogger(getClass());
+ private Logger log = LogManager.getLogger(getClass());
static final String PROTOCOL = "response:";
private ServletContext sc;
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/SimpleNodeList.java b/core/src/main/java/org/apache/struts2/views/xslt/SimpleNodeList.java
index 1a219152b3..a1c2092582 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/SimpleNodeList.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/SimpleNodeList.java
@@ -26,11 +26,11 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
public class SimpleNodeList implements NodeList {
- private Logger log = LoggerFactory.getLogger(SimpleNodeList.class);
+ private Logger log = LogManager.getLogger(SimpleNodeList.class);
private List nodes;
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/StringAdapter.java b/core/src/main/java/org/apache/struts2/views/xslt/StringAdapter.java
index b7c1dad965..d4509d1ecc 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/StringAdapter.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/StringAdapter.java
@@ -29,8 +29,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* StringAdapter adapts a Java String value to a DOM Element with the specified
@@ -47,7 +47,7 @@
*/
public class StringAdapter extends AbstractAdapterElement {
- private Logger log = LoggerFactory.getLogger(this.getClass());
+ private Logger log = LogManager.getLogger(this.getClass());
boolean parseStringAsXML;
public StringAdapter() {
diff --git a/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java b/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java
index 7c3dd77f4f..d0225e8d53 100644
--- a/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java
+++ b/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java
@@ -27,8 +27,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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsException;
@@ -210,7 +210,7 @@ public class XSLTResult implements Result {
private static final long serialVersionUID = 6424691441777176763L;
/** Log instance for this result. */
- private static final Logger LOG = LoggerFactory.getLogger(XSLTResult.class);
+ private static final Logger LOG = LogManager.getLogger(XSLTResult.class);
/** 'stylesheetLocation' parameter. Points to the xsl. */
public static final String DEFAULT_PARAM = "stylesheetLocation";
diff --git a/core/src/test/java/org/apache/struts2/ClassInstantiationTest.java b/core/src/test/java/org/apache/struts2/ClassInstantiationTest.java
index 4a34076aee..c97a90cd84 100644
--- a/core/src/test/java/org/apache/struts2/ClassInstantiationTest.java
+++ b/core/src/test/java/org/apache/struts2/ClassInstantiationTest.java
@@ -1,7 +1,5 @@
package org.apache.struts2;
-import com.opensymphony.xwork2.inject.Container;
-import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import java.util.HashMap;
diff --git a/core/src/test/java/org/apache/struts2/ExecutionCountTestAction.java b/core/src/test/java/org/apache/struts2/ExecutionCountTestAction.java
index 88b32e608f..31d048a26a 100644
--- a/core/src/test/java/org/apache/struts2/ExecutionCountTestAction.java
+++ b/core/src/test/java/org/apache/struts2/ExecutionCountTestAction.java
@@ -22,8 +22,8 @@
package org.apache.struts2;
import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
/**
@@ -34,7 +34,7 @@ public class ExecutionCountTestAction extends ActionSupport {
private static final long serialVersionUID = -2954211394678430609L;
- private static final Logger LOG = LoggerFactory.getLogger(ExecutionCountTestAction.class);
+ private static final Logger LOG = LogManager.getLogger(ExecutionCountTestAction.class);
private int executionCount = 0;
diff --git a/core/src/test/java/org/apache/struts2/ServletActionContextTest.java b/core/src/test/java/org/apache/struts2/ServletActionContextTest.java
index bd904eeba6..f29b2e95ec 100644
--- a/core/src/test/java/org/apache/struts2/ServletActionContextTest.java
+++ b/core/src/test/java/org/apache/struts2/ServletActionContextTest.java
@@ -21,18 +21,16 @@
package org.apache.struts2;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import junit.framework.TestCase;
-
import com.mockobjects.servlet.MockHttpServletRequest;
import com.mockobjects.servlet.MockHttpServletResponse;
import com.mockobjects.servlet.MockServletContext;
import com.opensymphony.xwork2.ActionContext;
+import junit.framework.TestCase;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+import java.util.Map;
/**
diff --git a/core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java b/core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java
index 68164812bd..81f575dcfe 100644
--- a/core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java
+++ b/core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java
@@ -22,7 +22,6 @@
package org.apache.struts2;
import com.opensymphony.xwork2.XWorkTestCase;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.util.logging.jdk.JdkLoggerFactory;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.util.StrutsTestCaseHelper;
@@ -32,11 +31,7 @@
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
-import java.util.logging.ConsoleHandler;
-import java.util.logging.Formatter;
-import java.util.logging.Level;
-import java.util.logging.LogRecord;
-import java.util.logging.Logger;
+import java.util.logging.*;
/**
* Base test case for JUnit testing Struts.
diff --git a/core/src/test/java/org/apache/struts2/TestAction.java b/core/src/test/java/org/apache/struts2/TestAction.java
index a95b37a3d8..dde13e5b95 100644
--- a/core/src/test/java/org/apache/struts2/TestAction.java
+++ b/core/src/test/java/org/apache/struts2/TestAction.java
@@ -26,11 +26,7 @@
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.views.jsp.ui.User;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
diff --git a/core/src/test/java/org/apache/struts2/TestConfigurationProvider.java b/core/src/test/java/org/apache/struts2/TestConfigurationProvider.java
index f9eb4c70b2..1806573734 100644
--- a/core/src/test/java/org/apache/struts2/TestConfigurationProvider.java
+++ b/core/src/test/java/org/apache/struts2/TestConfigurationProvider.java
@@ -24,8 +24,6 @@
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionProxyFactory;
import com.opensymphony.xwork2.DefaultActionProxyFactory;
-import com.opensymphony.xwork2.security.DefaultExcludedPatternsChecker;
-import com.opensymphony.xwork2.security.ExcludedPatternsChecker;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.config.ConfigurationException;
@@ -37,6 +35,8 @@
import com.opensymphony.xwork2.inject.ContainerBuilder;
import com.opensymphony.xwork2.interceptor.ParametersInterceptor;
import com.opensymphony.xwork2.mock.MockResult;
+import com.opensymphony.xwork2.security.DefaultExcludedPatternsChecker;
+import com.opensymphony.xwork2.security.ExcludedPatternsChecker;
import com.opensymphony.xwork2.util.location.LocatableProperties;
import com.opensymphony.xwork2.validator.ValidationInterceptor;
import org.apache.struts2.dispatcher.ServletDispatcherResult;
diff --git a/core/src/test/java/org/apache/struts2/TestResult.java b/core/src/test/java/org/apache/struts2/TestResult.java
index a1c7774bb9..5927f79559 100644
--- a/core/src/test/java/org/apache/struts2/TestResult.java
+++ b/core/src/test/java/org/apache/struts2/TestResult.java
@@ -21,17 +21,16 @@
package org.apache.struts2;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Assert;
-
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;
+import junit.framework.Assert;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
/**
@@ -43,7 +42,7 @@ public class TestResult implements Result {
private static final long serialVersionUID = -4429258122011663164L;
- private static final Logger LOG = LoggerFactory.getLogger(TestResult.class);
+ private static final Logger LOG = LogManager.getLogger(TestResult.class);
private List expectedValues = new ArrayList();
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java
index de8a0bdf48..106ba5fa17 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java
@@ -22,8 +22,8 @@
package org.apache.struts2.views.jsp;
import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.views.jsp.ui.AbstractUITag;
@@ -38,7 +38,7 @@
*/
public abstract class AbstractUITagTest extends AbstractTagTest {
- private static final Logger LOG = LoggerFactory.getLogger(AbstractUITagTest.class);
+ private static final Logger LOG = LogManager.getLogger(AbstractUITagTest.class);
static final String FREEMARKER_ERROR_EXPECTATION = "Java backtrace for programmers:";
diff --git a/plugins/cdi/src/main/java/org/apache/struts2/cdi/CdiObjectFactory.java b/plugins/cdi/src/main/java/org/apache/struts2/cdi/CdiObjectFactory.java
index 13ae6bee78..08a5ffa503 100644
--- a/plugins/cdi/src/main/java/org/apache/struts2/cdi/CdiObjectFactory.java
+++ b/plugins/cdi/src/main/java/org/apache/struts2/cdi/CdiObjectFactory.java
@@ -21,8 +21,8 @@
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.BeanManager;
@@ -46,7 +46,7 @@
*/
public class CdiObjectFactory extends ObjectFactory {
- private static final Logger LOG = LoggerFactory.getLogger(CdiObjectFactory.class);
+ private static final Logger LOG = LogManager.getLogger(CdiObjectFactory.class);
/**
* The key under which the BeanManager can be found according to CDI API docs
diff --git a/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java b/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
index faecb8653c..9fd0cb1fa1 100644
--- a/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
+++ b/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.ObjectFactory;
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 org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
import org.apache.commons.lang3.StringEscapeUtils;
@@ -47,7 +47,7 @@ public class ShowConfigAction extends ActionNamesAction {
private Set actionNames;
private String detailView = "results";
private PropertyDescriptor[] properties;
- private static Logger LOG = LoggerFactory.getLogger(ShowConfigAction.class);
+ private static Logger LOG = LogManager.getLogger(ShowConfigAction.class);
private ObjectFactory objectFactory;
private ReflectionProvider reflectionProvider;
diff --git a/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java b/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java
index 3453b906c4..90ea243c6e 100644
--- a/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java
+++ b/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java
@@ -22,8 +22,8 @@
package org.apache.struts2.config_browser;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionContextFactory;
import com.opensymphony.xwork2.util.reflection.ReflectionException;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
@@ -45,7 +45,7 @@
public class ShowValidatorAction extends ListValidatorsAction {
private static final long serialVersionUID = 4061534149317835177L;
- private static Logger LOG = LoggerFactory.getLogger(ShowValidatorAction.class);
+ private static Logger LOG = LogManager.getLogger(ShowValidatorAction.class);
private Set properties = Collections.emptySet();
private int selected = 0;
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
index ed708588e7..429d25bd62 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
@@ -38,8 +38,8 @@
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import javax.servlet.ServletContext;
import java.net.MalformedURLException;
@@ -67,7 +67,7 @@
*/
public class ConventionUnknownHandler implements UnknownHandler {
- private static final Logger LOG = LoggerFactory.getLogger(ConventionUnknownHandler.class);
+ private static final Logger LOG = LogManager.getLogger(ConventionUnknownHandler.class);
protected Configuration configuration;
protected ObjectFactory objectFactory;
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultInterceptorMapBuilder.java b/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultInterceptorMapBuilder.java
index da7ad20dfe..a678544ba0 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultInterceptorMapBuilder.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultInterceptorMapBuilder.java
@@ -27,8 +27,8 @@
import com.opensymphony.xwork2.config.providers.InterceptorBuilder;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.AnnotationUtils;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.InterceptorRef;
import org.apache.struts2.convention.annotation.InterceptorRefs;
@@ -43,8 +43,8 @@
*
*/
public class DefaultInterceptorMapBuilder implements InterceptorMapBuilder {
- private static final Logger LOG = LoggerFactory
- .getLogger(DefaultInterceptorMapBuilder.class);
+
+ private static final Logger LOG = LogManager.getLogger(DefaultInterceptorMapBuilder.class);
private Configuration configuration;
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java b/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java
index a9f44bde4c..0847bc7061 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java
@@ -32,8 +32,8 @@
import com.opensymphony.xwork2.util.finder.ClassLoaderInterfaceDelegate;
import com.opensymphony.xwork2.util.finder.ResourceFinder;
import com.opensymphony.xwork2.util.finder.Test;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.convention.annotation.Result;
@@ -117,7 +117,7 @@
*
*/
public class DefaultResultMapBuilder implements ResultMapBuilder {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultResultMapBuilder.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultResultMapBuilder.class);
private final ServletContext servletContext;
private Set relativeResultTypes;
private ConventionsService conventionsService;
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java b/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
index d1ad0c028b..ee6516fdc7 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
@@ -44,8 +44,8 @@
import com.opensymphony.xwork2.util.finder.ClassLoaderInterfaceDelegate;
import com.opensymphony.xwork2.util.finder.Test;
import com.opensymphony.xwork2.util.finder.UrlSet;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.StrutsConstants;
@@ -81,7 +81,7 @@
*/
public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
- private static final Logger LOG = LoggerFactory.getLogger(PackageBasedActionConfigBuilder.class);
+ private static final Logger LOG = LogManager.getLogger(PackageBasedActionConfigBuilder.class);
private static final boolean EXTRACT_BASE_INTERFACES = true;
private final Configuration configuration;
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java b/plugins/convention/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
index d9c90aff59..84420d7be3 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
@@ -21,8 +21,8 @@
package org.apache.struts2.convention;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
/**
@@ -34,7 +34,7 @@
*
*/
public class SEOActionNameBuilder implements ActionNameBuilder {
- private static final Logger LOG = LoggerFactory.getLogger(SEOActionNameBuilder.class);
+ private static final Logger LOG = LogManager.getLogger(SEOActionNameBuilder.class);
private String actionSuffix = "Action";
private boolean lowerCase;
private String separator;
diff --git a/plugins/dwr/src/main/java/org/apache/struts2/validators/DWRValidator.java b/plugins/dwr/src/main/java/org/apache/struts2/validators/DWRValidator.java
index 9d6f75055a..3375cf6538 100644
--- a/plugins/dwr/src/main/java/org/apache/struts2/validators/DWRValidator.java
+++ b/plugins/dwr/src/main/java/org/apache/struts2/validators/DWRValidator.java
@@ -42,8 +42,8 @@
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.ValidationAwareSupport;
import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -64,7 +64,7 @@
*/
public class DWRValidator {
- private static final Logger LOG = LoggerFactory.getLogger(DWRValidator.class);
+ private static final Logger LOG = LogManager.getLogger(DWRValidator.class);
public ValidationAwareSupport doPost(String namespace, String actionName, Map params) throws Exception {
HttpServletRequest req = WebContextFactory.get().getHttpServletRequest();
diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/JSPLoader.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/JSPLoader.java
index d738500568..127d173029 100644
--- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/JSPLoader.java
+++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/JSPLoader.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.util.finder.ClassLoaderInterface;
import com.opensymphony.xwork2.util.finder.ClassLoaderInterfaceDelegate;
import com.opensymphony.xwork2.util.finder.UrlSet;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
@@ -70,7 +70,7 @@
* directories.
*/
public class JSPLoader {
- private static final Logger LOG = LoggerFactory.getLogger(JSPLoader.class);
+ private static final Logger LOG = LogManager.getLogger(JSPLoader.class);
private static MemoryClassLoader classLoader = new MemoryClassLoader();
private static final String DEFAULT_PACKAGE = "org.apache.struts2.jsp";
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
index 8c0c901637..f5794f8d24 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRExporter;
import net.sf.jasperreports.engine.JRExporterParameter;
@@ -135,7 +135,7 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
private static final long serialVersionUID = -2523174799621182907L;
- private final static Logger LOG = LoggerFactory.getLogger(JasperReportsResult.class);
+ private final static Logger LOG = LogManager.getLogger(JasperReportsResult.class);
protected String dataSource;
protected String format;
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
index 6ca1a4a591..7fc8e165d4 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
@@ -22,8 +22,8 @@
package org.apache.struts2.views.jasperreports;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRField;
import net.sf.jasperreports.engine.JRRewindableDataSource;
@@ -39,7 +39,7 @@ public class ValueStackDataSource implements JRRewindableDataSource {
/**
* Logger for this class
*/
- private static Logger LOG = LoggerFactory.getLogger(ValueStackDataSource.class);
+ private static Logger LOG = LogManager.getLogger(ValueStackDataSource.class);
private Iterator iterator;
private ValueStack valueStack;
diff --git a/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java b/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
index 2d49e18bb6..6bd3035f3a 100644
--- a/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
+++ b/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
@@ -22,8 +22,8 @@
import com.opensymphony.xwork2.util.finder.ClassFinder;
import com.opensymphony.xwork2.util.finder.ClassLoaderInterface;
import com.opensymphony.xwork2.util.finder.Test;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.ClassReader;
@@ -60,7 +60,7 @@
*/
public class Java8ClassFinder implements ClassFinder {
- private static final Logger LOG = LoggerFactory.getLogger(Java8ClassFinder.class);
+ private static final Logger LOG = LogManager.getLogger(Java8ClassFinder.class);
private final Map> annotated = new HashMap>();
private final Map classInfos = new LinkedHashMap();
diff --git a/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinderFactory.java b/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinderFactory.java
index 3ab5f9eb2a..1d3feab6e0 100644
--- a/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinderFactory.java
+++ b/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinderFactory.java
@@ -19,8 +19,8 @@
import com.opensymphony.xwork2.util.finder.ClassFinderFactory;
import com.opensymphony.xwork2.util.finder.ClassLoaderInterface;
import com.opensymphony.xwork2.util.finder.Test;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.net.URL;
import java.util.Collection;
@@ -28,7 +28,7 @@
public class Java8ClassFinderFactory implements ClassFinderFactory {
- private static final Logger LOG = LoggerFactory.getLogger(Java8ClassFinderFactory.class);
+ private static final Logger LOG = LogManager.getLogger(Java8ClassFinderFactory.class);
public Java8ClassFinderFactory() {
try {
diff --git a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTagHandlerFactory.java b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTagHandlerFactory.java
index 7e932aaa18..b31b9be08c 100644
--- a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTagHandlerFactory.java
+++ b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTagHandlerFactory.java
@@ -20,14 +20,14 @@
*/
package org.apache.struts2.views.java;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Default implementation of TagHandlerFactory
*/
public class DefaultTagHandlerFactory implements TagHandlerFactory {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultTagHandlerFactory.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultTagHandlerFactory.class);
private Class tagHandlerClass;
diff --git a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java
index 8a9db258b7..1e3076a602 100644
--- a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java
+++ b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java
@@ -29,14 +29,14 @@
import java.util.List;
import java.util.Map;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Default implementation of the theme
*/
public class DefaultTheme implements Theme {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultTheme.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultTheme.class);
private String name;
protected Map> handlerFactories;
diff --git a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java
index f3dd5a1621..26a7ea3506 100644
--- a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java
+++ b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsException;
import org.apache.struts2.components.template.BaseTemplateEngine;
import org.apache.struts2.components.template.Template;
@@ -42,7 +42,7 @@
*/
public class JavaTemplateEngine extends BaseTemplateEngine {
- private static final Logger LOG = LoggerFactory.getLogger(JavaTemplateEngine.class);
+ private static final Logger LOG = LogManager.getLogger(JavaTemplateEngine.class);
// The struts template engine manager
protected TemplateEngineManager templateEngineManager;
diff --git a/plugins/jfreechart/src/main/java/org/apache/struts2/dispatcher/ChartResult.java b/plugins/jfreechart/src/main/java/org/apache/struts2/dispatcher/ChartResult.java
index 26cea0f0c4..76c2936c92 100644
--- a/plugins/jfreechart/src/main/java/org/apache/struts2/dispatcher/ChartResult.java
+++ b/plugins/jfreechart/src/main/java/org/apache/struts2/dispatcher/ChartResult.java
@@ -23,8 +23,8 @@
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
@@ -102,7 +102,7 @@
*/
public class ChartResult extends StrutsResultSupport {
- private final static Logger LOG = LoggerFactory.getLogger(ChartResult.class);
+ private final static Logger LOG = LogManager.getLogger(ChartResult.class);
private static final long serialVersionUID = -6484761870055986612L;
private static final String DEFAULT_TYPE = "png";
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONCleaner.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONCleaner.java
index bb87c2f625..8a8d0a7256 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONCleaner.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONCleaner.java
@@ -32,8 +32,8 @@
import com.opensymphony.xwork2.util.TextParseUtil;
import com.opensymphony.xwork2.util.WildcardUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Isolate the process of cleaning JSON data from the Interceptor class
@@ -47,7 +47,7 @@
*/
public abstract class JSONCleaner {
- private static final Logger LOG = LoggerFactory.getLogger(JSONCleaner.class);
+ private static final Logger LOG = LogManager.getLogger(JSONCleaner.class);
public static class Filter
{
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
index f802af9eb1..227d66ab7e 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
@@ -48,15 +48,15 @@
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.WildcardUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Populates an action from a JSON string
*/
public class JSONInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = 4950170304212158803L;
- private static final Logger LOG = LoggerFactory.getLogger(JSONInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(JSONInterceptor.class);
private boolean enableSMD = false;
private boolean enableGZIP = false;
private boolean wrapWithComments;
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONPopulator.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONPopulator.java
index 6d03bdc6ef..a0b1f8b9c9 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONPopulator.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONPopulator.java
@@ -48,8 +48,8 @@
import org.apache.struts2.json.annotations.JSON;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Isolate the process of populating JSON objects from the Interceptor class
@@ -57,7 +57,7 @@
*/
public class JSONPopulator {
- private static final Logger LOG = LoggerFactory.getLogger(JSONPopulator.class);
+ private static final Logger LOG = LogManager.getLogger(JSONPopulator.class);
private String dateFormat = JSONUtil.RFC3339_FORMAT;
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
index 59f28fd43d..32025a8463 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
@@ -26,8 +26,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.WildcardUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.json.smd.SMDGenerator;
@@ -63,7 +63,7 @@ public class JSONResult implements Result {
private static final long serialVersionUID = 8624350183189931165L;
- private static final Logger LOG = LoggerFactory.getLogger(JSONResult.class);
+ private static final Logger LOG = LogManager.getLogger(JSONResult.class);
/**
* This result type doesn't have a default param, null is ok to reduce noise in logs
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java
index f8f86dd72c..993de806a7 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java
@@ -22,8 +22,8 @@
import com.opensymphony.xwork2.util.TextParseUtil;
import com.opensymphony.xwork2.util.WildcardUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.json.annotations.SMDMethod;
@@ -42,7 +42,7 @@ public class JSONUtil {
public final static String RFC3339_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
- private static final Logger LOG = LoggerFactory.getLogger(JSONUtil.class);
+ private static final Logger LOG = LogManager.getLogger(JSONUtil.class);
/**
* Serializes an object into JSON.
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
index 819420576f..d94adc1866 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
@@ -26,8 +26,8 @@
import com.opensymphony.xwork2.ModelDriven;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.struts2.ServletActionContext;
@@ -70,7 +70,7 @@
*/
public class JSONValidationInterceptor extends MethodFilterInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(JSONValidationInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(JSONValidationInterceptor.class);
private static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
private static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
index dc53967e31..39529d2ef2 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.json;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.json.annotations.JSON;
import org.apache.struts2.json.annotations.JSONFieldBridge;
import org.apache.struts2.json.annotations.JSONParameter;
@@ -51,7 +51,7 @@
*/
public class JSONWriter {
- private static final Logger LOG = LoggerFactory.getLogger(JSONWriter.class);
+ private static final Logger LOG = LogManager.getLogger(JSONWriter.class);
/**
* By default, enums are serialised as name=value pairs
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/rpc/RPCError.java b/plugins/json/src/main/java/org/apache/struts2/json/rpc/RPCError.java
index c9a66ceb62..528fc7037b 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/rpc/RPCError.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/rpc/RPCError.java
@@ -23,14 +23,14 @@
import java.io.PrintWriter;
import java.io.StringWriter;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/*
* Used to serialize RPC Errors
*/
public class RPCError {
- private static final Logger LOG = LoggerFactory.getLogger(RPCError.class);
+ private static final Logger LOG = LogManager.getLogger(RPCError.class);
private int code;
private String name;
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/smd/SMDGenerator.java b/plugins/json/src/main/java/org/apache/struts2/json/smd/SMDGenerator.java
index d4479b99d6..decf22b32a 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/smd/SMDGenerator.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/smd/SMDGenerator.java
@@ -2,8 +2,8 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.json.JSONUtil;
import org.apache.struts2.json.annotations.SMD;
@@ -18,7 +18,7 @@
public class SMDGenerator {
- private static final Logger LOG = LoggerFactory.getLogger(SMDGenerator.class);
+ private static final Logger LOG = LogManager.getLogger(SMDGenerator.class);
// rootObject is based on OGNL expression (action by default)
private Object rootObject;
diff --git a/plugins/junit/src/main/java/org/apache/struts2/StrutsJUnit4TestCase.java b/plugins/junit/src/main/java/org/apache/struts2/StrutsJUnit4TestCase.java
index 7bf18b7a3d..46d2e99814 100644
--- a/plugins/junit/src/main/java/org/apache/struts2/StrutsJUnit4TestCase.java
+++ b/plugins/junit/src/main/java/org/apache/struts2/StrutsJUnit4TestCase.java
@@ -30,6 +30,7 @@
import com.opensymphony.xwork2.interceptor.annotations.After;
import com.opensymphony.xwork2.interceptor.annotations.Before;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.logging.jdk.JdkLoggerFactory;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.dispatcher.Dispatcher;
diff --git a/plugins/junit/src/main/java/org/apache/struts2/StrutsTestCase.java b/plugins/junit/src/main/java/org/apache/struts2/StrutsTestCase.java
index de6f477ff1..add0df0a6e 100644
--- a/plugins/junit/src/main/java/org/apache/struts2/StrutsTestCase.java
+++ b/plugins/junit/src/main/java/org/apache/struts2/StrutsTestCase.java
@@ -27,6 +27,7 @@
import com.opensymphony.xwork2.XWorkTestCase;
import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.logging.jdk.JdkLoggerFactory;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
diff --git a/plugins/junit/src/test/java/actions/ViewAction.java b/plugins/junit/src/test/java/actions/ViewAction.java
index 4c1141b8d4..a90da9edf6 100644
--- a/plugins/junit/src/test/java/actions/ViewAction.java
+++ b/plugins/junit/src/test/java/actions/ViewAction.java
@@ -21,8 +21,6 @@
package actions;
import com.opensymphony.xwork2.ActionSupport;
-import org.apache.struts2.convention.annotation.Action;
-import org.apache.struts2.convention.annotation.Result;
/**
* Example action, which is called by the convention plugin test case
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleFreemarkerManager.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleFreemarkerManager.java
index 3282ba5ea9..ceddb91992 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleFreemarkerManager.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleFreemarkerManager.java
@@ -21,8 +21,8 @@
package org.apache.struts2.osgi;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import freemarker.cache.ClassTemplateLoader;
import freemarker.cache.FileTemplateLoader;
import freemarker.cache.MultiTemplateLoader;
@@ -43,7 +43,7 @@
*/
public class BundleFreemarkerManager extends FreemarkerManager {
- private static final Logger LOG = LoggerFactory.getLogger(BundleFreemarkerManager.class);
+ private static final Logger LOG = LogManager.getLogger(BundleFreemarkerManager.class);
protected TemplateLoader createTemplateLoader(ServletContext servletContext, String templatePath) {
TemplateLoader templatePathLoader = null;
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundlePackageLoader.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundlePackageLoader.java
index 1a01414e48..7e3add76a8 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundlePackageLoader.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundlePackageLoader.java
@@ -28,8 +28,8 @@
import com.opensymphony.xwork2.config.entities.PackageConfig;
import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -46,7 +46,7 @@
*/
public class BundlePackageLoader implements PackageLoader {
- private static final Logger LOG = LoggerFactory.getLogger(BundlePackageLoader.class);
+ private static final Logger LOG = LogManager.getLogger(BundlePackageLoader.class);
public List loadPackages(Bundle bundle, BundleContext bundleContext, ObjectFactory objectFactory,
FileManagerFactory fileManagerFactory, Map pkgConfigs) throws ConfigurationException {
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
index 91c436317c..199f1834c1 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.osgi.host.OsgiHost;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -50,7 +50,7 @@
public class DefaultBundleAccessor implements BundleAccessor {
private static DefaultBundleAccessor self;
- private static final Logger LOG = LoggerFactory.getLogger(DefaultBundleAccessor.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultBundleAccessor.class);
private BundleContext bundleContext;
private Map packageToBundle = new HashMap();
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
index 5e400ed57b..63620cb4da 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
@@ -30,8 +30,8 @@
import com.opensymphony.xwork2.config.entities.PackageConfig;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.finder.ClassLoaderInterface;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.osgi.host.OsgiHost;
import org.apache.struts2.osgi.loaders.VelocityBundleResourceLoader;
@@ -53,7 +53,7 @@
*/
public class OsgiConfigurationProvider implements PackageProvider, BundleListener {
- private static final Logger LOG = LoggerFactory.getLogger(OsgiConfigurationProvider.class);
+ private static final Logger LOG = LogManager.getLogger(OsgiConfigurationProvider.class);
private Configuration configuration;
private ObjectFactory objectFactory;
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
index e1df192489..b5eaf6f4e9 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
@@ -21,8 +21,8 @@
package org.apache.struts2.osgi;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.osgi.framework.Bundle;
import java.lang.reflect.Method;
@@ -31,7 +31,7 @@
public class OsgiUtil {
- private static final Logger LOG = LoggerFactory.getLogger(OsgiUtil.class);
+ private static final Logger LOG = LogManager.getLogger(OsgiUtil.class);
/**
* A bundle is a jar, and a bunble URL will be useless to clients, this method translates
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java
index 31b980f0c1..b379538c1c 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java
@@ -1,7 +1,7 @@
package org.apache.struts2.osgi;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsException;
import org.apache.struts2.osgi.host.OsgiHost;
@@ -17,7 +17,7 @@ public class StrutsOsgiListener implements ServletContextListener {
public static final String OSGI_HOST = "__struts_osgi_host";
public static final String PLATFORM_KEY = "struts.osgi.host";
- private static final Logger LOG = LoggerFactory.getLogger(StrutsOsgiListener.class);
+ private static final Logger LOG = LogManager.getLogger(StrutsOsgiListener.class);
private OsgiHost osgiHost;
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
index 0670a2134a..02256169e8 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.FileManager;
import com.opensymphony.xwork2.FileManagerFactory;
import com.opensymphony.xwork2.util.finder.ResourceFinder;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang.StringUtils;
import org.apache.felix.main.AutoProcessor;
import org.apache.felix.shell.ShellService;
@@ -58,7 +58,7 @@
*/
public abstract class BaseOsgiHost implements OsgiHost {
- private static final Logger LOG = LoggerFactory.getLogger(BaseOsgiHost.class);
+ private static final Logger LOG = LogManager.getLogger(BaseOsgiHost.class);
protected static final Pattern versionPattern = Pattern.compile("([\\d])+[\\.-]");
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
index 77d2614cc1..f1393ea5f5 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
@@ -22,8 +22,8 @@
package org.apache.struts2.osgi.host;
import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.felix.framework.Felix;
import org.apache.felix.framework.util.FelixConstants;
@@ -51,7 +51,7 @@
*/
public class FelixOsgiHost extends BaseOsgiHost {
- private static final Logger LOG = LoggerFactory.getLogger(FelixOsgiHost.class);
+ private static final Logger LOG = LogManager.getLogger(FelixOsgiHost.class);
protected Felix felix;
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/GlassfishOSGiHost.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/GlassfishOSGiHost.java
index 1a500915a1..9744fb01de 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/GlassfishOSGiHost.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/GlassfishOSGiHost.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.osgi.host;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.felix.shell.ShellService;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -43,7 +43,7 @@
*/
public class GlassfishOSGiHost extends BaseOsgiHost implements OsgiHost {
- private static final Logger LOG = LoggerFactory.getLogger(GlassfishOSGiHost.class);
+ private static final Logger LOG = LogManager.getLogger(GlassfishOSGiHost.class);
/**
* Location inside the WAR where initial bundles are located.
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java
index 4f6eed5ffb..53a58ebf86 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.osgi.host.OsgiHost;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
@@ -41,7 +41,7 @@
*/
public class OsgiInterceptor extends AbstractInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(OsgiInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(OsgiInterceptor.class);
private BundleContext bundleContext;
diff --git a/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java b/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
index 8c35fe0100..b748fce5ec 100644
--- a/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
+++ b/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
@@ -4,8 +4,8 @@
import com.opensymphony.xwork2.FileManagerFactory;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import net.sf.oval.configuration.Configurer;
import net.sf.oval.configuration.annotation.AnnotationsConfigurer;
import net.sf.oval.configuration.annotation.JPAAnnotationsConfigurer;
@@ -22,7 +22,7 @@
public class DefaultOValValidationManager implements OValValidationManager {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultOValValidationManager.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultOValValidationManager.class);
protected static final String VALIDATION_CONFIG_SUFFIX = "-validation.xml";
protected final Map> validatorCache = new HashMap>();
diff --git a/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java b/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
index a09cec40b4..b4d5410ccf 100644
--- a/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
+++ b/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
@@ -28,8 +28,8 @@
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
import com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.validator.DelegatingValidatorContext;
import com.opensymphony.xwork2.validator.ValidatorContext;
import net.sf.oval.ConstraintViolation;
@@ -49,7 +49,7 @@
This interceptor provides validation using the OVal validation framework
*/
public class OValValidationInterceptor extends MethodFilterInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(OValValidationInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(OValValidationInterceptor.class);
protected final static String VALIDATE_PREFIX = "validate";
protected final static String ALT_VALIDATE_PREFIX = "validateDo";
diff --git a/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java b/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
index ed18a32ed6..0e5402d19d 100644
--- a/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
+++ b/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import http.utils.multipartrequest.ServletMultipartRequest;
import org.apache.struts2.StrutsConstants;
@@ -45,7 +45,7 @@
*/
public class PellMultiPartRequest implements MultiPartRequest {
- private static final Logger LOG = LoggerFactory.getLogger(PellMultiPartRequest.class);
+ private static final Logger LOG = LogManager.getLogger(PellMultiPartRequest.class);
private ServletMultipartRequest multi;
private String defaultEncoding;
diff --git a/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusFilter.java b/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusFilter.java
index 4d0fb13269..8058daca9c 100644
--- a/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusFilter.java
+++ b/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusFilter.java
@@ -36,14 +36,14 @@
import org.codehaus.plexus.PlexusContainer;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Creates a plexus container for the application, session, and request
*/
public class PlexusFilter implements Filter {
- private static final Logger LOG = LoggerFactory.getLogger(PlexusObjectFactory.class);
+ private static final Logger LOG = LogManager.getLogger(PlexusObjectFactory.class);
private static final String CHILD_CONTAINER_NAME = "request";
private static boolean loaded = false;
diff --git a/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusLifecycleListener.java b/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusLifecycleListener.java
index b38bbaac35..f4ba972a88 100644
--- a/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusLifecycleListener.java
+++ b/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusLifecycleListener.java
@@ -33,14 +33,14 @@
import org.codehaus.plexus.DefaultPlexusContainer;
import org.codehaus.plexus.PlexusContainer;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Manages the Plexus lifecycle for the servlet and session contexts
*/
public class PlexusLifecycleListener implements ServletContextListener, HttpSessionListener {
- private static final Logger LOG = LoggerFactory.getLogger(PlexusObjectFactory.class);
+ private static final Logger LOG = LogManager.getLogger(PlexusObjectFactory.class);
private static boolean loaded = false;
public static final String KEY = "struts.plexus.container";
diff --git a/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java b/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
index a0089e4a65..5033b99690 100644
--- a/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
+++ b/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
@@ -30,8 +30,8 @@
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.Interceptor;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
import com.opensymphony.xwork2.validator.Validator;
import org.codehaus.plexus.PlexusContainer;
@@ -71,7 +71,7 @@
*/
public class PlexusObjectFactory extends ObjectFactory {
- private static final Logger LOG = LoggerFactory.getLogger(PlexusObjectFactory.class);
+ private static final Logger LOG = LogManager.getLogger(PlexusObjectFactory.class);
private static final String PLEXUS_COMPONENT_TYPE = "plexus.component.type";
diff --git a/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusUtils.java b/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusUtils.java
index c12f0ae5c4..27575bd405 100644
--- a/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusUtils.java
+++ b/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusUtils.java
@@ -28,14 +28,14 @@
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.configuration.PlexusConfigurationResourceException;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Utility methods for dealing with Plexus
*/
public class PlexusUtils {
- private static final Logger LOG = LoggerFactory.getLogger(PlexusObjectFactory.class);
+ private static final Logger LOG = LogManager.getLogger(PlexusObjectFactory.class);
/**
* Configures the container with the configuration file
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/StrutsPortletTestCase.java b/plugins/portlet/src/main/java/org/apache/struts2/StrutsPortletTestCase.java
index 6291a9b72b..ad89df1838 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/StrutsPortletTestCase.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/StrutsPortletTestCase.java
@@ -1,8 +1,8 @@
package org.apache.struts2;
import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.portlet.PortletConstants;
import org.apache.struts2.portlet.PortletPhase;
import org.springframework.mock.web.portlet.MockPortletContext;
@@ -20,7 +20,7 @@
*/
public abstract class StrutsPortletTestCase extends StrutsTestCase {
- private static final Logger LOG = LoggerFactory.getLogger(StrutsPortletTestCase.class);
+ private static final Logger LOG = LogManager.getLogger(StrutsPortletTestCase.class);
protected MockPortletSession portletSession;
protected MockPortletRequest portletRequest;
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
index 99da301658..d3a76120be 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
@@ -27,8 +27,8 @@
import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsException;
@@ -174,7 +174,7 @@
*/
public class Jsr168Dispatcher extends GenericPortlet implements StrutsStatics {
- private static final Logger LOG = LoggerFactory.getLogger(Jsr168Dispatcher.class);
+ private static final Logger LOG = LogManager.getLogger(Jsr168Dispatcher.class);
protected String portletNamespace = null;
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr286Dispatcher.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr286Dispatcher.java
index 9a5c3293b6..2e82f0bb4e 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr286Dispatcher.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr286Dispatcher.java
@@ -1,8 +1,8 @@
package org.apache.struts2.portlet.dispatcher;
import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.portlet.PortletPhase;
import org.apache.struts2.portlet.servlet.PortletServletResponse;
import org.apache.struts2.portlet.servlet.PortletServletResponseJSR286;
@@ -18,7 +18,7 @@
public class Jsr286Dispatcher extends Jsr168Dispatcher {
- private final static Logger LOG = LoggerFactory.getLogger(Jsr286Dispatcher.class);
+ private final static Logger LOG = LogManager.getLogger(Jsr286Dispatcher.class);
@Override
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletAwareInterceptor.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletAwareInterceptor.java
index cc2d23b0f6..87fd279484 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletAwareInterceptor.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletAwareInterceptor.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.ActionContext;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.interceptor.PrincipalAware;
import org.apache.struts2.portlet.PortletConstants;
@@ -37,7 +37,7 @@ public class PortletAwareInterceptor extends AbstractInterceptor implements Stru
private static final long serialVersionUID = 2476509721059587700L;
- private static final Logger LOG = LoggerFactory.getLogger(PortletAwareInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(PortletAwareInterceptor.class);
/**
* Sets action properties based on the interfaces an action implements. Things like application properties,
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java
index 536882c6c1..48832a47c6 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.util.CompoundRoot;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.portlet.PortletConstants;
import org.apache.struts2.portlet.PortletPhase;
@@ -39,7 +39,7 @@
public class PortletStateInterceptor extends AbstractInterceptor {
- private final static Logger LOG = LoggerFactory.getLogger(PortletStateInterceptor.class);
+ private final static Logger LOG = LogManager.getLogger(PortletStateInterceptor.class);
private static final long serialVersionUID = 6138452063353911784L;
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java
index ea868653e4..7fa2336788 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java
@@ -22,8 +22,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.StrutsResultSupport;
@@ -61,7 +61,7 @@ public class PortletResult extends StrutsResultSupport {
/**
* Logger instance.
*/
- private static final Logger LOG = LoggerFactory.getLogger(PortletResult.class);
+ private static final Logger LOG = LogManager.getLogger(PortletResult.class);
private String contentType = "text/html";
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
index 65e02913d2..2d43c27815 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
@@ -24,8 +24,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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.dispatcher.StrutsResultSupport;
@@ -90,7 +90,7 @@ public class PortletVelocityResult extends StrutsResultSupport {
private static final long serialVersionUID = -8241086555872212274L;
- private static final Logger LOG = LoggerFactory.getLogger(PortletVelocityResult.class);
+ private static final Logger LOG = LogManager.getLogger(PortletVelocityResult.class);
private String defaultEncoding;
private VelocityManager velocityManager;
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java
index d9ccf92a7d..6e9f0f5e1b 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java
@@ -9,8 +9,8 @@
import javax.portlet.ResourceResponse;
import javax.servlet.ServletOutputStream;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* PortletServletResponseJSR286.
@@ -19,7 +19,7 @@
*/
public class PortletServletResponseJSR286 extends PortletServletResponse {
- private static final Logger LOG = LoggerFactory.getLogger(PortletServletResponseJSR286.class);
+ private static final Logger LOG = LogManager.getLogger(PortletServletResponseJSR286.class);
public PortletServletResponseJSR286( PortletResponse portletResponse ) {
super(portletResponse);
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
index 73a40d77b9..7e722877c9 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
@@ -20,8 +20,8 @@
*/
package org.apache.struts2.portlet.util;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.StrutsException;
import org.apache.struts2.portlet.context.PortletActionContext;
@@ -53,7 +53,7 @@
public class PortletUrlHelper {
public static final String ENCODING = "UTF-8";
- private static final Logger LOG = LoggerFactory.getLogger(PortletUrlHelper.class);
+ private static final Logger LOG = LogManager.getLogger(PortletUrlHelper.class);
protected static final String PORTLETMODE_NAME_EDIT = "edit";
protected static final String PORTLETMODE_NAME_VIEW = "view";
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelperJSR286.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelperJSR286.java
index 5f98742fd5..82e9699b99 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelperJSR286.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelperJSR286.java
@@ -7,8 +7,8 @@
import javax.portlet.PortletSecurityException;
import java.util.Map;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* PortletUrlJSR286Helper.
@@ -17,7 +17,7 @@
*/
public class PortletUrlHelperJSR286 extends PortletUrlHelper {
- private static final Logger LOG = LoggerFactory.getLogger(PortletUrlHelperJSR286.class);
+ private static final Logger LOG = LogManager.getLogger(PortletUrlHelperJSR286.class);
protected String encodeUrl( StringBuffer sb, PortletRequest req ) {
MimeResponse resp = (MimeResponse) PortletActionContext.getResponse();
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
index ed8c695f20..6574cbeefd 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
@@ -31,8 +31,8 @@
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.HttpHeaderResult;
@@ -54,7 +54,7 @@ public class RestActionInvocation extends DefaultActionInvocation {
private static final long serialVersionUID = 3485701178946428716L;
- private static final Logger LOG = LoggerFactory.getLogger(RestActionInvocation.class);
+ private static final Logger LOG = LogManager.getLogger(RestActionInvocation.class);
private ContentTypeHandlerManager handlerSelector;
private boolean logger;
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
index c4fd827cff..e637f20d8d 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.config.entities.PackageConfig;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.RequestUtils;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
@@ -96,7 +96,7 @@
*/
public class RestActionMapper extends DefaultActionMapper {
- protected static final Logger LOG = LoggerFactory.getLogger(RestActionMapper.class);
+ protected static final Logger LOG = LogManager.getLogger(RestActionMapper.class);
public static final String HTTP_METHOD_PARAM = "_method";
private String idParameterName = "id";
private String indexMethodName = "index";
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java
index 72193ae941..ce794c1c1a 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java
@@ -27,8 +27,8 @@
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
@@ -134,7 +134,7 @@ public class RestWorkflowInterceptor extends MethodFilterInterceptor {
private static final long serialVersionUID = 7563014655616490865L;
- private static final Logger LOG = LoggerFactory.getLogger(RestWorkflowInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(RestWorkflowInterceptor.class);
private String inputResultName = Action.INPUT;
diff --git a/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java b/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
index 2a30c34c25..accfd3b8fc 100644
--- a/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
+++ b/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
@@ -21,8 +21,8 @@
package org.apache.struts2.sitegraph;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsException;
import org.apache.struts2.sitegraph.renderers.DOTRenderer;
@@ -45,7 +45,7 @@
*/
public class SiteGraph {
- private static final Logger LOG = LoggerFactory.getLogger(SiteGraph.class);
+ private static final Logger LOG = LogManager.getLogger(SiteGraph.class);
private String configDir;
private String views;
diff --git a/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java b/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java
index 11605fa005..1e6b245b19 100644
--- a/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java
+++ b/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.config.ConfigurationProvider;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.config.DefaultBeanSelectionProvider;
import org.apache.struts2.config.DefaultPropertiesProvider;
import org.apache.struts2.config.PropertiesConfigurationProvider;
@@ -48,7 +48,7 @@
*/
public class StrutsConfigRetriever {
- private static final Logger LOG = LoggerFactory.getLogger(StrutsConfigRetriever.class);
+ private static final Logger LOG = LogManager.getLogger(StrutsConfigRetriever.class);
private static String configDir;
private static String[] views;
private static boolean isXWorkStarted = false;
diff --git a/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/FileBasedView.java b/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/FileBasedView.java
index 91b44b78ad..1ac2f3cce3 100644
--- a/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/FileBasedView.java
+++ b/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/FileBasedView.java
@@ -21,8 +21,8 @@
package org.apache.struts2.sitegraph.entities;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.sitegraph.model.Link;
import java.io.*;
@@ -37,7 +37,7 @@ public abstract class FileBasedView implements View {
private String name;
private String contents;
- private static final Logger LOG = LoggerFactory.getLogger(FileBasedView.class);
+ private static final Logger LOG = LogManager.getLogger(FileBasedView.class);
public FileBasedView(File file) {
this.name = file.getName();
diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
index b2b9b35259..4f573bddd8 100644
--- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
+++ b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
@@ -23,7 +23,7 @@
import com.opensymphony.module.sitemesh.HTMLPage;
import com.opensymphony.module.sitemesh.RequestConstants;
import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
import freemarker.core.InvalidReferenceException;
import freemarker.template.Configuration;
import freemarker.template.ObjectWrapper;
@@ -31,6 +31,7 @@
import freemarker.template.Template;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModel;
+import org.apache.logging.log4j.Logger;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.dispatcher.Dispatcher;
@@ -57,26 +58,11 @@
* own manager
*/
public class FreemarkerDecoratorServlet extends freemarker.ext.servlet.FreemarkerServlet {
- private static final com.opensymphony.xwork2.util.logging.Logger LOG = LoggerFactory.getLogger(FreemarkerDecoratorServlet.class);
-
-
- protected FreemarkerManager freemarkerManager;
-
+ private static final Logger LOG = LogManager.getLogger(FreemarkerDecoratorServlet.class);
public static final long serialVersionUID = -2440216393145762479L;
-
-/*
- private static final String EXPIRATION_DATE;
-
- static {
- // Generate expiration date that is one year from now in the past
- GregorianCalendar expiration = new GregorianCalendar();
- expiration.roll(Calendar.YEAR, -1);
- SimpleDateFormat httpDate = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", java.util.Locale.US);
- EXPIRATION_DATE = httpDate.format(expiration.getTime());
- }
-*/
+ protected FreemarkerManager freemarkerManager;
protected String templatePath;
protected boolean nocache;
protected boolean debug;
diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsFreemarkerDecorator.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsFreemarkerDecorator.java
index 44f7905c94..d767f187a8 100644
--- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsFreemarkerDecorator.java
+++ b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsFreemarkerDecorator.java
@@ -26,8 +26,8 @@
import com.opensymphony.sitemesh.Content;
import com.opensymphony.sitemesh.compatability.Content2HTMLPage;
import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
import freemarker.template.Configuration;
import freemarker.template.SimpleHash;
@@ -45,7 +45,7 @@
* Extends OldDecorator2NewStrutsDecorator to add Struts functionality for Freemarker
*/
public class OldDecorator2NewStrutsFreemarkerDecorator extends OldDecorator2NewStrutsDecorator {
- private static final Logger LOG = LoggerFactory.getLogger(OldDecorator2NewStrutsFreemarkerDecorator.class);
+ private static final Logger LOG = LogManager.getLogger(OldDecorator2NewStrutsFreemarkerDecorator.class);
private static FreemarkerManager freemarkerManager;
diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsVelocityDecorator.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsVelocityDecorator.java
index b5362ce560..cb1ea1871a 100644
--- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsVelocityDecorator.java
+++ b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsVelocityDecorator.java
@@ -29,8 +29,8 @@
import com.opensymphony.sitemesh.compatability.Content2HTMLPage;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.views.velocity.VelocityManager;
import org.apache.velocity.context.Context;
@@ -45,7 +45,7 @@
* Extends OldDecorator2NewStrutsDecorator to add Struts functionality for Velocity
*/
public class OldDecorator2NewStrutsVelocityDecorator extends OldDecorator2NewStrutsDecorator {
- private static final Logger LOG = LoggerFactory.getLogger(OldDecorator2NewStrutsFreemarkerDecorator.class);
+ private static final Logger LOG = LogManager.getLogger(OldDecorator2NewStrutsFreemarkerDecorator.class);
private static VelocityManager velocityManager;
diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/StrutsSiteMeshFactory.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/StrutsSiteMeshFactory.java
index 96405fb379..a47802f79f 100644
--- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/StrutsSiteMeshFactory.java
+++ b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/StrutsSiteMeshFactory.java
@@ -21,15 +21,15 @@
import com.opensymphony.module.sitemesh.Config;
import com.opensymphony.module.sitemesh.factory.DefaultFactory;
import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsStatics;
public class StrutsSiteMeshFactory extends DefaultFactory {
- private static final Logger LOG = LoggerFactory.getLogger(StrutsSiteMeshFactory.class);
+ private static final Logger LOG = LogManager.getLogger(StrutsSiteMeshFactory.class);
public StrutsSiteMeshFactory(Config config) {
super(config);
diff --git a/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java b/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
index 60f782d81f..b3f9a532a8 100644
--- a/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
+++ b/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.util.classloader.FileResourceStore;
import com.opensymphony.xwork2.util.classloader.JarResourceStore;
import com.opensymphony.xwork2.util.classloader.ReloadingClassLoader;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.jci.monitor.FilesystemAlterationListener;
import org.apache.commons.jci.monitor.FilesystemAlterationMonitor;
import org.apache.commons.jci.monitor.FilesystemAlterationObserver;
@@ -71,7 +71,7 @@
*
*/
public class ClassReloadingXMLWebApplicationContext extends XmlWebApplicationContext implements FilesystemAlterationListener {
- private static final Logger LOG = LoggerFactory.getLogger(ClassReloadingXMLWebApplicationContext.class);
+ private static final Logger LOG = LogManager.getLogger(ClassReloadingXMLWebApplicationContext.class);
protected ReloadingClassLoader classLoader;
protected FilesystemAlterationMonitor fam;
diff --git a/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java b/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
index d95830aa94..c34a6e4a33 100644
--- a/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
+++ b/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.spring.SpringObjectFactory;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.StrutsConstants;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
@@ -44,7 +44,7 @@
*
*/
public class StrutsSpringObjectFactory extends SpringObjectFactory {
- private static final Logger LOG = LoggerFactory.getLogger(StrutsSpringObjectFactory.class);
+ private static final Logger LOG = LogManager.getLogger(StrutsSpringObjectFactory.class);
//@Inject
//public StrutsSpringObjectFactory(
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java
index b2213ca7e0..b04908af10 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java
@@ -31,8 +31,8 @@
import org.apache.tiles.factory.TilesContainerFactory;
import org.apache.tiles.web.startup.TilesListener;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* Listener used to automatically inject ServletContext
@@ -47,7 +47,7 @@
*/
public class StrutsTilesListener extends TilesListener {
- private static final Logger LOG = LoggerFactory.getLogger(StrutsTilesListener.class);
+ private static final Logger LOG = LogManager.getLogger(StrutsTilesListener.class);
private static final Map INIT;
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesRequestContext.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesRequestContext.java
index 856517c034..0e2f86598e 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesRequestContext.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesRequestContext.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.views.freemarker.FreemarkerResult;
import org.apache.tiles.context.TilesRequestContext;
@@ -48,7 +48,7 @@
*/
public class StrutsTilesRequestContext extends TilesRequestContextWrapper {
- private static final Logger LOG = LoggerFactory.getLogger(StrutsTilesRequestContext.class);
+ private static final Logger LOG = LogManager.getLogger(StrutsTilesRequestContext.class);
/**
* The mask used to detect requests which should be intercepted.
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
index 170c567968..694dbfef71 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
@@ -18,8 +18,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;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import java.util.*;
@@ -81,7 +81,7 @@
*/
public class ActionChainResult implements Result {
- private static final Logger LOG = LoggerFactory.getLogger(ActionChainResult.class);
+ private static final Logger LOG = LogManager.getLogger(ActionChainResult.class);
/**
* The result parameter name to set the name of the action to chain to.
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
index 31eb5d36c8..940dbfad79 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
@@ -18,16 +18,11 @@
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;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import java.io.Serializable;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
+import java.util.*;
/**
@@ -36,7 +31,7 @@
*/
public class ActionSupport implements Action, Validateable, ValidationAware, TextProvider, LocaleProvider, Serializable {
- protected static Logger LOG = LoggerFactory.getLogger(ActionSupport.class);
+ protected static Logger LOG = LogManager.getLogger(ActionSupport.class);
private final ValidationAwareSupport validationAware = new ValidationAwareSupport();
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java b/xwork-core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
index 2e1ce4cc64..af18986565 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
@@ -1,8 +1,8 @@
package com.opensymphony.xwork2;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import java.util.*;
@@ -17,7 +17,7 @@
*/
public class CompositeTextProvider implements TextProvider {
- private static final Logger LOG = LoggerFactory.getLogger(CompositeTextProvider.class);
+ private static final Logger LOG = LogManager.getLogger(CompositeTextProvider.class);
private List textProviders = new ArrayList();
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
index 1bf7ccf4c8..917a3766a2 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
@@ -25,12 +25,11 @@
import com.opensymphony.xwork2.ognl.OgnlUtil;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
import ognl.MethodFailedException;
import ognl.NoSuchPropertyException;
-import ognl.OgnlException;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import java.util.ArrayList;
import java.util.Iterator;
@@ -48,7 +47,7 @@
*/
public class DefaultActionInvocation implements ActionInvocation {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultActionInvocation.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultActionInvocation.class);
protected Object action;
protected ActionProxy proxy;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java
index 92c387015d..e66d269a71 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java
@@ -25,11 +25,11 @@
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import java.io.Serializable;
import java.util.Locale;
@@ -48,7 +48,7 @@ public class DefaultActionProxy implements ActionProxy, Serializable {
private static final long serialVersionUID = 3293074152487468527L;
- private static final Logger LOG = LoggerFactory.getLogger(DefaultActionProxy.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultActionProxy.class);
protected Configuration configuration;
protected ActionConfig config;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java
index 0aafd93245..b83339cf00 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java
@@ -1,7 +1,7 @@
package com.opensymphony.xwork2;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import java.util.Locale;
@@ -10,7 +10,7 @@
*/
public class DefaultLocaleProvider implements LocaleProvider {
- private final static Logger LOG = LoggerFactory.getLogger(DefaultLocaleProvider.class);
+ private final static Logger LOG = LogManager.getLogger(DefaultLocaleProvider.class);
public Locale getLocale() {
ActionContext ctx = ActionContext.getContext();
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java
index bdee9613b9..f1a6c7fbb2 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java
@@ -20,19 +20,14 @@
import com.opensymphony.xwork2.config.entities.InterceptorConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.conversion.TypeConverter;
-import com.opensymphony.xwork2.factory.ActionFactory;
-import com.opensymphony.xwork2.factory.ConverterFactory;
-import com.opensymphony.xwork2.factory.InterceptorFactory;
-import com.opensymphony.xwork2.factory.ResultFactory;
-import com.opensymphony.xwork2.factory.UnknownHandlerFactory;
-import com.opensymphony.xwork2.factory.ValidatorFactory;
+import com.opensymphony.xwork2.factory.*;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.validator.Validator;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import java.io.Serializable;
import java.util.Map;
@@ -50,7 +45,7 @@
*/
public class ObjectFactory implements Serializable {
- private static final Logger LOG = LoggerFactory.getLogger(ObjectFactory.class);
+ private static final Logger LOG = LogManager.getLogger(ObjectFactory.class);
private transient ClassLoader ccl;
private Container container;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java b/xwork-core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java
index 462d9d9a98..947613327f 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java
@@ -19,11 +19,7 @@
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.ValueStack;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Locale;
-import java.util.ResourceBundle;
+import java.util.*;
/**
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java b/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java
index 46f44b6a06..86a33c6354 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java
@@ -19,11 +19,7 @@
import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.config.ConfigurationProvider;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.ContainerBuilder;
-import com.opensymphony.xwork2.inject.Context;
-import com.opensymphony.xwork2.inject.Factory;
-import com.opensymphony.xwork2.inject.Scope;
+import com.opensymphony.xwork2.inject.*;
import com.opensymphony.xwork2.test.StubConfigurationProvider;
import com.opensymphony.xwork2.util.XWorkTestCaseHelper;
import com.opensymphony.xwork2.util.location.LocatableProperties;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
index 042fda4b61..d85332260e 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
@@ -19,8 +19,8 @@
import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
import com.opensymphony.xwork2.config.providers.XWorkConfigurationProvider;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -38,7 +38,7 @@
*/
public class ConfigurationManager {
- protected static final Logger LOG = LoggerFactory.getLogger(ConfigurationManager.class);
+ protected static final Logger LOG = LogManager.getLogger(ConfigurationManager.class);
protected Configuration configuration;
protected Lock providerLock = new ReentrantLock();
private List containerProviders = new CopyOnWriteArrayList();
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java
index 936afe5ff5..ea848418ad 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java
@@ -16,8 +16,8 @@
package com.opensymphony.xwork2.config;
import com.opensymphony.xwork2.config.entities.PackageConfig;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.ArrayList;
import java.util.Collections;
@@ -31,7 +31,7 @@
*/
public class ConfigurationUtil {
- private static final Logger LOG = LoggerFactory.getLogger(ConfigurationUtil.class);
+ private static final Logger LOG = LogManager.getLogger(ConfigurationUtil.class);
private ConfigurationUtil() {
}
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
index eeb530ee7f..7d0a981f38 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
@@ -17,8 +17,8 @@
import com.opensymphony.xwork2.util.location.Located;
import com.opensymphony.xwork2.util.location.Location;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.Serializable;
import java.util.ArrayList;
@@ -38,7 +38,7 @@
*/
public class PackageConfig extends Located implements Comparable, Serializable, InterceptorLocator {
- private static final Logger LOG = LoggerFactory.getLogger(PackageConfig.class);
+ private static final Logger LOG = LogManager.getLogger(PackageConfig.class);
protected Map actionConfigs;
protected Map globalResultConfigs;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java
index 391e254794..5a1d33d586 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java
@@ -18,8 +18,8 @@
package com.opensymphony.xwork2.config.impl;
import com.opensymphony.xwork2.util.PatternMatcher;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.math.NumberUtils;
import java.io.Serializable;
@@ -42,7 +42,7 @@ public abstract class AbstractMatcher implements Serializable {
/**
* The logging instance
*/
- private static final Logger log = LoggerFactory.getLogger(AbstractMatcher.class);
+ private static final Logger log = LogManager.getLogger(AbstractMatcher.class);
/**
* Handles all wildcard pattern matching.
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
index fb92d615d8..d811c43d82 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
@@ -87,8 +87,8 @@
import com.opensymphony.xwork2.util.fs.DefaultFileManager;
import com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory;
import com.opensymphony.xwork2.util.location.LocatableProperties;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
import ognl.PropertyAccessor;
@@ -110,7 +110,7 @@
*/
public class DefaultConfiguration implements Configuration {
- protected static final Logger LOG = LoggerFactory.getLogger(DefaultConfiguration.class);
+ protected static final Logger LOG = LogManager.getLogger(DefaultConfiguration.class);
// Programmatic Action Configurations
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
index 5e0b00495f..f60f7d8962 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.config.entities.InterceptorStackConfig;
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.util.location.Location;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.ArrayList;
import java.util.LinkedHashMap;
@@ -42,7 +42,7 @@
*/
public class InterceptorBuilder {
- private static final Logger LOG = LoggerFactory.getLogger(InterceptorBuilder.class);
+ private static final Logger LOG = LogManager.getLogger(InterceptorBuilder.class);
/**
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
index 153ae90c3b..4f6f5ab900 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
@@ -35,8 +35,8 @@
import com.opensymphony.xwork2.util.location.LocatableProperties;
import com.opensymphony.xwork2.util.location.Location;
import com.opensymphony.xwork2.util.location.LocationUtils;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -64,7 +64,7 @@
*/
public class XmlConfigurationProvider implements ConfigurationProvider {
- private static final Logger LOG = LoggerFactory.getLogger(XmlConfigurationProvider.class);
+ private static final Logger LOG = LogManager.getLogger(XmlConfigurationProvider.class);
private List documents;
private Set includedFileNames;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java
index 0f10085140..d22cf54c07 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java
@@ -8,8 +8,8 @@
import com.opensymphony.xwork2.conversion.annotations.ConversionType;
import com.opensymphony.xwork2.conversion.annotations.TypeConversion;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Map;
@@ -18,7 +18,7 @@
*/
public class DefaultConversionAnnotationProcessor implements ConversionAnnotationProcessor {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultConversionAnnotationProcessor.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultConversionAnnotationProcessor.class);
private TypeConverterCreator converterCreator;
private TypeConverterHolder converterHolder;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java
index 4537b0e127..7fb36d3f9e 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java
@@ -7,8 +7,8 @@
import com.opensymphony.xwork2.conversion.TypeConverterCreator;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.InputStream;
import java.util.Map;
@@ -19,7 +19,7 @@
*/
public class DefaultConversionFileProcessor implements ConversionFileProcessor {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultConversionFileProcessor.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultConversionFileProcessor.class);
private FileManager fileManager;
private TypeConverterCreator converterCreator;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
index 49c29bb1e7..d2518773ee 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
@@ -7,8 +7,8 @@
import com.opensymphony.xwork2.conversion.TypeConverterHolder;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.IOException;
import java.net.URL;
@@ -21,7 +21,7 @@
*/
public class DefaultConversionPropertiesProcessor implements ConversionPropertiesProcessor {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultConversionPropertiesProcessor.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultConversionPropertiesProcessor.class);
private TypeConverterCreator converterCreator;
private TypeConverterHolder converterHolder;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
index c2c26cd7e0..36c46138b4 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
@@ -21,8 +21,8 @@
import com.opensymphony.xwork2.util.Element;
import com.opensymphony.xwork2.util.Key;
import com.opensymphony.xwork2.util.KeyProperty;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionException;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
@@ -52,7 +52,7 @@
*/
public class DefaultObjectTypeDeterminer implements ObjectTypeDeterminer {
- protected static final Logger LOG = LoggerFactory.getLogger(DefaultObjectTypeDeterminer.class);
+ protected static final Logger LOG = LogManager.getLogger(DefaultObjectTypeDeterminer.class);
public static final String KEY_PREFIX = "Key_";
public static final String ELEMENT_PREFIX = "Element_";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java
index 188e92d03f..da49d66e33 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java
@@ -19,8 +19,8 @@
import com.opensymphony.xwork2.conversion.NullHandler;
import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
@@ -72,7 +72,7 @@ public class InstantiatingNullHandler implements NullHandler {
* @deprecated Use {@link ReflectionContextState#CREATE_NULL_OBJECTS} instead
*/
@Deprecated public static final String CREATE_NULL_OBJECTS = ReflectionContextState.CREATE_NULL_OBJECTS;
- private static final Logger LOG = LoggerFactory.getLogger(InstantiatingNullHandler.class);
+ private static final Logger LOG = LogManager.getLogger(InstantiatingNullHandler.class);
private ReflectionProvider reflectionProvider;
private ObjectFactory objectFactory;
private ObjectTypeDeterminer objectTypeDeterminer;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
index a91ca1c608..9599b95a10 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
@@ -33,8 +33,8 @@
import com.opensymphony.xwork2.util.CompoundRoot;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
import org.apache.commons.lang3.StringUtils;
@@ -131,7 +131,7 @@
*/
public class XWorkConverter extends DefaultTypeConverter {
- private static final Logger LOG = LoggerFactory.getLogger(XWorkConverter.class);
+ private static final Logger LOG = LogManager.getLogger(XWorkConverter.class);
public static final String REPORT_CONVERSION_ERRORS = "report.conversion.errors";
public static final String CONVERSION_PROPERTY_FULLNAME = "conversion.property.fullName";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java
index 1234e2ef6c..340dc849de 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java
@@ -17,8 +17,8 @@
import com.opensymphony.xwork2.conversion.annotations.ConversionRule;
import com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.PrintWriter;
import java.io.StringWriter;
@@ -55,7 +55,7 @@ public class ConversionDescription {
public String type = null;
public ConversionDescription() {
- log = LoggerFactory.getLogger(this.getClass());
+ log = LogManager.getLogger(this.getClass());
}
/**
@@ -65,7 +65,7 @@ public ConversionDescription() {
*/
public ConversionDescription(String property) {
this.property = property;
- log = LoggerFactory.getLogger(this.getClass());
+ log = LogManager.getLogger(this.getClass());
}
/**
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/factory/DefaultConverterFactory.java b/xwork-core/src/main/java/com/opensymphony/xwork2/factory/DefaultConverterFactory.java
index 315d901c7a..73596c89cd 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/factory/DefaultConverterFactory.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/factory/DefaultConverterFactory.java
@@ -3,8 +3,8 @@
import com.opensymphony.xwork2.conversion.TypeConverter;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Map;
@@ -13,7 +13,7 @@
*/
public class DefaultConverterFactory implements ConverterFactory {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultConverterFactory.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultConverterFactory.class);
private Container container;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java
index a9f90f8133..f05a75c575 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java
@@ -27,8 +27,8 @@
import com.opensymphony.xwork2.util.ValueStackFactory;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Map;
@@ -88,7 +88,7 @@
*/
public class AliasInterceptor extends AbstractInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(AliasInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(AliasInterceptor.class);
private static final String DEFAULT_ALIAS_KEY = "aliases";
protected String aliasesKey = DEFAULT_ALIAS_KEY;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java
index 36f8c2d19b..8218e1baf3 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java
@@ -22,8 +22,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.CompoundRoot;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
import java.util.*;
@@ -100,7 +100,7 @@
*/
public class ChainingInterceptor extends AbstractInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(ChainingInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ChainingInterceptor.class);
private static final String ACTION_ERRORS = "actionErrors";
private static final String FIELD_ERRORS = "fieldErrors";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java
index 9391f1f8dd..4d13f40442 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java
@@ -19,8 +19,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.lang.reflect.Method;
@@ -121,7 +121,7 @@ public class DefaultWorkflowInterceptor extends MethodFilterInterceptor {
private static final long serialVersionUID = 7563014655616490865L;
- private static final Logger LOG = LoggerFactory.getLogger(DefaultWorkflowInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultWorkflowInterceptor.class);
private static final Class[] EMPTY_CLASS_ARRAY = new Class[0];
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java
index fe79fb3264..d1a5319301 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java
@@ -17,8 +17,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.HashMap;
import java.util.List;
@@ -149,7 +149,7 @@
*/
public class ExceptionMappingInterceptor extends AbstractInterceptor {
- protected static final Logger LOG = LoggerFactory.getLogger(ExceptionMappingInterceptor.class);
+ protected static final Logger LOG = LogManager.getLogger(ExceptionMappingInterceptor.class);
protected Logger categoryLogger;
protected boolean logEnabled = false;
@@ -216,7 +216,7 @@ protected void handleLogging(Exception e) {
if (logCategory != null) {
if (categoryLogger == null) {
// init category logger
- categoryLogger = LoggerFactory.getLogger(logCategory);
+ categoryLogger = LogManager.getLogger(logCategory);
}
doLog(categoryLogger, e);
} else {
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
index 3deb268d1f..1d52c9c9c7 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
@@ -18,8 +18,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Locale;
import java.util.Map;
@@ -89,7 +89,7 @@
public class I18nInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = 2496830135246700300L;
- protected static final Logger LOG = LoggerFactory.getLogger(I18nInterceptor.class);
+ protected static final Logger LOG = LogManager.getLogger(I18nInterceptor.class);
public static final String DEFAULT_SESSION_ATTRIBUTE = "WW_TRANS_I18N_LOCALE";
public static final String DEFAULT_PARAMETER = "request_locale";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java
index a5aa1b2804..2ec655e08e 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java
@@ -16,8 +16,8 @@
package com.opensymphony.xwork2.interceptor;
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
@@ -57,7 +57,7 @@
* @author Jason Carreira
*/
public class LoggingInterceptor extends AbstractInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(LoggingInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(LoggingInterceptor.class);
private static final String FINISH_MESSAGE = "Finishing execution stack for action ";
private static final String START_MESSAGE = "Starting execution stack for action ";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java
index fd44df86af..0cdedb0bf0 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java
@@ -18,8 +18,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.util.TextParseUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Collections;
import java.util.Set;
@@ -71,7 +71,7 @@
* @version $Date$ $Id$
*/
public abstract class MethodFilterInterceptor extends AbstractInterceptor {
- protected transient Logger log = LoggerFactory.getLogger(getClass());
+ protected transient Logger log = LogManager.getLogger(getClass());
protected Set excludeMethods = Collections.emptySet();
protected Set includeMethods = Collections.emptySet();
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterFilterInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterFilterInterceptor.java
index a3d73f8e30..1e4b036abc 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterFilterInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterFilterInterceptor.java
@@ -17,8 +17,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.util.TextParseUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Collection;
import java.util.HashSet;
@@ -95,7 +95,7 @@
*/
public class ParameterFilterInterceptor extends AbstractInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(ParameterFilterInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ParameterFilterInterceptor.class);
private Collection allowed;
private Collection blocked;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptor.java
index f79e21a6f3..523831c980 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptor.java
@@ -18,8 +18,8 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.util.TextParseUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Collections;
import java.util.Map;
@@ -79,7 +79,7 @@
*/
public class ParameterRemoverInterceptor extends AbstractInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(ParameterRemoverInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ParameterRemoverInterceptor.class);
private static final long serialVersionUID = 1;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
index 8317feb1a7..d2074aca3e 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
@@ -29,8 +29,8 @@
import com.opensymphony.xwork2.util.MemberAccessValueStack;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
import java.util.Collection;
@@ -135,7 +135,7 @@
*/
public class ParametersInterceptor extends MethodFilterInterceptor {
- private static final Logger LOG = LoggerFactory.getLogger(ParametersInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ParametersInterceptor.class);
protected static final int PARAM_NAME_MAX_LENGTH = 100;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java
index bf15eeb40a..aa1540bd90 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java
@@ -16,8 +16,8 @@
package com.opensymphony.xwork2.interceptor;
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -63,7 +63,7 @@
*/
public class PrefixMethodInvocationUtil {
- private static final Logger LOG = LoggerFactory.getLogger(PrefixMethodInvocationUtil.class);
+ private static final Logger LOG = LogManager.getLogger(PrefixMethodInvocationUtil.class);
private static final String DEFAULT_INVOCATION_METHODNAME = "execute";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/PrepareInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/PrepareInterceptor.java
index 4d0822f11c..6a327c394d 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/PrepareInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/PrepareInterceptor.java
@@ -18,8 +18,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Preparable;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.lang.reflect.InvocationTargetException;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java
index 8639346e0a..67e121cb3d 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java
@@ -24,8 +24,8 @@
import com.opensymphony.xwork2.config.entities.Parameterizable;
import com.opensymphony.xwork2.util.*;
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Collections;
import java.util.Map;
@@ -87,7 +87,7 @@ public class StaticParametersInterceptor extends AbstractInterceptor {
static boolean devMode = false;
- private static final Logger LOG = LoggerFactory.getLogger(StaticParametersInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(StaticParametersInterceptor.class);
private ValueStackFactory valueStackFactory;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/TimerInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/TimerInterceptor.java
index ad53d80e46..a52c092bfa 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/TimerInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/TimerInterceptor.java
@@ -16,8 +16,8 @@
package com.opensymphony.xwork2.interceptor;
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -92,7 +92,7 @@
* @author Claus Ibsen
*/
public class TimerInterceptor extends AbstractInterceptor {
- protected static final Logger LOG = LoggerFactory.getLogger(TimerInterceptor.class);
+ protected static final Logger LOG = LogManager.getLogger(TimerInterceptor.class);
protected Logger categoryLogger;
protected String logCategory;
@@ -175,7 +175,7 @@ protected Logger getLoggerToUse() {
if (logCategory != null) {
if (categoryLogger == null) {
// init category logger
- categoryLogger = LoggerFactory.getLogger(logCategory);
+ categoryLogger = LogManager.getLogger(logCategory);
if (logLevel == null) {
logLevel = "info"; // use info as default if not provided
}
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
index 63c45fe1d2..a67ede97b5 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
@@ -23,8 +23,8 @@
import com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor;
import com.opensymphony.xwork2.util.CompoundRoot;
import com.opensymphony.xwork2.util.TextParseUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionException;
import ognl.ClassResolver;
import ognl.Ognl;
@@ -57,7 +57,7 @@
*/
public class OgnlUtil {
- private static final Logger LOG = LoggerFactory.getLogger(OgnlUtil.class);
+ private static final Logger LOG = LogManager.getLogger(OgnlUtil.class);
private ConcurrentMap expressions = new ConcurrentHashMap();
private final ConcurrentMap beanInfoCache = new ConcurrentHashMap();
private TypeConverter defaultConverter;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
index 1b09ef6641..0f1c0483f2 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
@@ -27,8 +27,8 @@
import com.opensymphony.xwork2.util.CompoundRoot;
import com.opensymphony.xwork2.util.MemberAccessValueStack;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.logging.LoggerUtils;
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
import ognl.*;
@@ -55,7 +55,7 @@ public class OgnlValueStack implements Serializable, ValueStack, ClearableValueS
private static final long serialVersionUID = 370737852934925530L;
private static final String MAP_IDENTIFIER_KEY = "com.opensymphony.xwork2.util.OgnlValueStack.MAP_IDENTIFIER_KEY";
- private static final Logger LOG = LoggerFactory.getLogger(OgnlValueStack.class);
+ private static final Logger LOG = LogManager.getLogger(OgnlValueStack.class);
CompoundRoot root;
transient Map context;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
index eb586e5737..040077db3b 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
@@ -15,8 +15,8 @@
*/
package com.opensymphony.xwork2.ognl;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import ognl.DefaultMemberAccess;
import java.lang.reflect.Member;
@@ -33,7 +33,7 @@
*/
public class SecurityMemberAccess extends DefaultMemberAccess {
- private static final Logger LOG = LoggerFactory.getLogger(SecurityMemberAccess.class);
+ private static final Logger LOG = LogManager.getLogger(SecurityMemberAccess.class);
private final boolean allowStaticMethodAccess;
private Set excludeProperties = Collections.emptySet();
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java
index 27352b9b36..bad1fc0876 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java
@@ -21,8 +21,8 @@
import com.opensymphony.xwork2.ognl.OgnlValueStack;
import com.opensymphony.xwork2.util.CompoundRoot;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import ognl.*;
import java.beans.IntrospectionException;
@@ -56,7 +56,7 @@ public String getSourceSetter(OgnlContext context, Object target, Object index)
return null;
}
- private final static Logger LOG = LoggerFactory.getLogger(CompoundRootAccessor.class);
+ private final static Logger LOG = LogManager.getLogger(CompoundRootAccessor.class);
private final static Class[] EMPTY_CLASS_ARRAY = new Class[0];
private static Map invalidMethods = new ConcurrentHashMap();
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java
index aed7949d62..a656634072 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java
@@ -21,8 +21,8 @@
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.ognl.OgnlUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
import ognl.ObjectPropertyAccessor;
@@ -41,7 +41,7 @@
*/
public class XWorkCollectionPropertyAccessor extends SetPropertyAccessor {
- private static final Logger LOG = LoggerFactory.getLogger(XWorkCollectionPropertyAccessor.class);
+ private static final Logger LOG = LogManager.getLogger(XWorkCollectionPropertyAccessor.class);
private static final String CONTEXT_COLLECTION_MAP = "xworkCollectionPropertyAccessorContextSetMap";
public static final String KEY_PROPERTY_FOR_CREATION = "makeNew";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMapPropertyAccessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMapPropertyAccessor.java
index 576ab3d8ae..d752216417 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMapPropertyAccessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMapPropertyAccessor.java
@@ -20,8 +20,8 @@
import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer;
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
import ognl.MapPropertyAccessor;
import ognl.OgnlException;
@@ -36,7 +36,7 @@
*/
public class XWorkMapPropertyAccessor extends MapPropertyAccessor {
- private static final Logger LOG = LoggerFactory.getLogger(XWorkMapPropertyAccessor.class);
+ private static final Logger LOG = LogManager.getLogger(XWorkMapPropertyAccessor.class);
private static final String[] INDEX_ACCESS_PROPS = new String[]
{"size", "isEmpty", "keys", "values"};
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMethodAccessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMethodAccessor.java
index 11d3f315f2..7d38122ed7 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMethodAccessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMethodAccessor.java
@@ -26,8 +26,8 @@
import ognl.OgnlRuntime;
import ognl.PropertyAccessor;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
@@ -40,7 +40,7 @@
*/
public class XWorkMethodAccessor extends ObjectMethodAccessor {
- private static final Logger LOG = LoggerFactory.getLogger(XWorkMethodAccessor.class);
+ private static final Logger LOG = LogManager.getLogger(XWorkMethodAccessor.class);
/**
* @deprecated Use {@link ReflectionContextState#DENY_METHOD_EXECUTION} instead
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
index 4992281a31..20eeff86b1 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
@@ -3,8 +3,8 @@
import com.opensymphony.xwork2.XWorkConstants;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.TextParseUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Arrays;
import java.util.HashSet;
@@ -13,7 +13,7 @@
public class DefaultAcceptedPatternsChecker implements AcceptedPatternsChecker {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultAcceptedPatternsChecker.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultAcceptedPatternsChecker.class);
public static final String[] ACCEPTED_PATTERNS = {
"\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'\\])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*"
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
index d96b67a6a1..8ac60eba36 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
@@ -3,8 +3,8 @@
import com.opensymphony.xwork2.*;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.TextParseUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.Arrays;
import java.util.HashSet;
@@ -13,7 +13,7 @@
public class DefaultExcludedPatternsChecker implements ExcludedPatternsChecker {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultExcludedPatternsChecker.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultExcludedPatternsChecker.class);
public static final String[] EXCLUDED_PATTERNS = {
"(^|.*#)(dojo|struts|session|request|application|servlet(Request|Response)|parameters|context|_memberAccess)(\\.|\\[).*",
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java b/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
index 56f6b539ee..2cfb09190b 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
@@ -17,8 +17,8 @@
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.UnsatisfiedDependencyException;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
@@ -39,7 +39,7 @@
* @author Simon Stewart (sms@lateral.net)
*/
public class SpringObjectFactory extends ObjectFactory implements ApplicationContextAware {
- private static final Logger LOG = LoggerFactory.getLogger(SpringObjectFactory.class);
+ private static final Logger LOG = LogManager.getLogger(SpringObjectFactory.class);
protected ApplicationContext appContext;
protected AutowireCapableBeanFactory autoWiringFactory;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java b/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
index 8d5a5241f7..616ac0f9d2 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
@@ -15,8 +15,8 @@
*/
package com.opensymphony.xwork2.spring;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
@@ -33,7 +33,7 @@
*/
public class SpringProxyableObjectFactory extends SpringObjectFactory {
- private static final Logger LOG = LoggerFactory.getLogger(SpringProxyableObjectFactory.class);
+ private static final Logger LOG = LogManager.getLogger(SpringProxyableObjectFactory.class);
private List skipBeanNames = new ArrayList();
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
index 473e0dc492..611a1a35cd 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
@@ -20,8 +20,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.spring.SpringObjectFactory;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
@@ -60,7 +60,7 @@
* @author Eric Hauser
*/
public class ActionAutowiringInterceptor extends AbstractInterceptor implements ApplicationContextAware {
- private static final Logger LOG = LoggerFactory.getLogger(ActionAutowiringInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ActionAutowiringInterceptor.class);
public static final String APPLICATION_CONTEXT = "com.opensymphony.xwork2.spring.interceptor.ActionAutowiringInterceptor.applicationContext";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
index 71ecc8223d..6e77ecff7c 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
@@ -19,8 +19,8 @@
import com.opensymphony.xwork2.XWorkException;
import com.opensymphony.xwork2.util.location.Location;
import com.opensymphony.xwork2.util.location.LocationAttributes;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -43,7 +43,7 @@
*/
public class DomHelper {
- private static final Logger LOG = LoggerFactory.getLogger(DomHelper.class);
+ private static final Logger LOG = LogManager.getLogger(DomHelper.class);
public static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
index 1e51dedfd8..943a956203 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
@@ -25,8 +25,8 @@
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.util.reflection.ReflectionProviderFactory;
import org.apache.commons.lang3.ObjectUtils;
@@ -86,7 +86,7 @@
*/
public class LocalizedTextUtil {
- private static final Logger LOG = LoggerFactory.getLogger(LocalizedTextUtil.class);
+ private static final Logger LOG = LogManager.getLogger(LocalizedTextUtil.class);
private static final String TOMCAT_RESOURCE_ENTRIES_FIELD = "resourceEntries";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java
index 59d1f3ccfd..e7222cdf6d 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java
@@ -14,8 +14,8 @@
*/
package com.opensymphony.xwork2.util;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.File;
import java.io.FileInputStream;
@@ -66,7 +66,7 @@
*/
public class ResolverUtil {
/** An instance of Log to use for logging in this class. */
- private static final Logger LOG = LoggerFactory.getLogger(ResolverUtil.class);
+ private static final Logger LOG = LogManager.getLogger(ResolverUtil.class);
/**
* A simple interface that specifies how to test classes to determine if they
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
index 160a5b99bb..db436f1338 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
@@ -15,8 +15,8 @@
*/
package com.opensymphony.xwork2.util;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.net.MalformedURLException;
import java.net.URL;
@@ -26,7 +26,7 @@
*/
public class URLUtil {
- private static final Logger LOG = LoggerFactory.getLogger(URLUtil.class);
+ private static final Logger LOG = LogManager.getLogger(URLUtil.class);
/**
* Verify That the given String is in valid URL format.
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/XWorkList.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/XWorkList.java
index 6feee75a24..d627473847 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/XWorkList.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/XWorkList.java
@@ -20,8 +20,8 @@
import com.opensymphony.xwork2.XWorkException;
import com.opensymphony.xwork2.conversion.TypeConverter;
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.ArrayList;
import java.util.Collection;
@@ -38,7 +38,7 @@
* @author Patrick Lightbody
*/
public class XWorkList extends ArrayList {
- private static final Logger LOG = LoggerFactory.getLogger(XWorkConverter.class);
+ private static final Logger LOG = LogManager.getLogger(XWorkConverter.class);
private Class clazz;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/FileResourceStore.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/FileResourceStore.java
index 4475449c51..bab9368523 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/FileResourceStore.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/FileResourceStore.java
@@ -15,8 +15,8 @@
*/
package com.opensymphony.xwork2.util.classloader;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.File;
import java.io.FileInputStream;
@@ -29,7 +29,7 @@
* class taken from Apache JCI
*/
public final class FileResourceStore implements ResourceStore {
- private static final Logger LOG = LoggerFactory.getLogger(FileResourceStore.class);
+ private static final Logger LOG = LogManager.getLogger(FileResourceStore.class);
private final File root;
public FileResourceStore(final File pFile) {
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/JarResourceStore.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/JarResourceStore.java
index c991f759a4..19c95247a7 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/JarResourceStore.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/JarResourceStore.java
@@ -16,8 +16,8 @@
package com.opensymphony.xwork2.util.classloader;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.*;
import java.util.zip.ZipEntry;
@@ -27,7 +27,7 @@
* Read resources from a jar file
*/
public class JarResourceStore implements ResourceStore {
- private static final Logger LOG = LoggerFactory.getLogger(JarResourceStore.class);
+ private static final Logger LOG = LogManager.getLogger(JarResourceStore.class);
private final File file;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/ReloadingClassLoader.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/ReloadingClassLoader.java
index dd84fcb581..7c46ee6cde 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/ReloadingClassLoader.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/ReloadingClassLoader.java
@@ -19,8 +19,8 @@
import com.opensymphony.xwork2.FileManager;
import com.opensymphony.xwork2.FileManagerFactory;
import com.opensymphony.xwork2.XWorkException;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.ObjectUtils;
import java.io.File;
@@ -41,7 +41,7 @@
* class taken from Apache JCI
*/
public class ReloadingClassLoader extends ClassLoader {
- private static final Logger LOG = LoggerFactory.getLogger(ReloadingClassLoader.class);
+ private static final Logger LOG = LogManager.getLogger(ReloadingClassLoader.class);
private final ClassLoader parent;
private ResourceStore[] stores;
private ClassLoader delegate;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStoreClassLoader.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStoreClassLoader.java
index dfb0c1855c..d84c1062bd 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStoreClassLoader.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStoreClassLoader.java
@@ -15,15 +15,15 @@
*/
package com.opensymphony.xwork2.util.classloader;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
* class taken from Apache JCI
*/
public final class ResourceStoreClassLoader extends ClassLoader {
- private static final Logger LOG = LoggerFactory.getLogger(ResourceStoreClassLoader.class);
+ private static final Logger LOG = LogManager.getLogger(ResourceStoreClassLoader.class);
private final ResourceStore[] stores;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java
index a80849bddb..44d4eb23cd 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java
@@ -19,8 +19,8 @@
import com.opensymphony.xwork2.FileManager;
import com.opensymphony.xwork2.FileManagerFactory;
import com.opensymphony.xwork2.XWorkException;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.ClassReader;
@@ -52,7 +52,7 @@
import java.util.jar.JarInputStream;
public class DefaultClassFinder implements ClassFinder {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultClassFinder.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultClassFinder.class);
private final Map> annotated = new HashMap>();
private final Map classInfos = new LinkedHashMap();
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ResourceFinder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ResourceFinder.java
index 47e7642533..ffda50757b 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ResourceFinder.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ResourceFinder.java
@@ -15,8 +15,8 @@
*/
package com.opensymphony.xwork2.util.finder;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.StringUtils;
import java.io.BufferedInputStream;
@@ -47,7 +47,7 @@
* @version $Rev$ $Date$
*/
public class ResourceFinder {
- private static final Logger LOG = LoggerFactory.getLogger(ResourceFinder.class);
+ private static final Logger LOG = LogManager.getLogger(ResourceFinder.class);
private final URL[] urls;
private final String path;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java
index ded02efb8d..c38d5d539a 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java
@@ -15,8 +15,8 @@
*/
package com.opensymphony.xwork2.util.finder;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
@@ -51,7 +51,7 @@
*/
public class UrlSet {
- private static final Logger LOG = LoggerFactory.getLogger(UrlSet.class);
+ private static final Logger LOG = LogManager.getLogger(UrlSet.class);
private final Map urls;
private Set protocols;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManager.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManager.java
index f54d49077d..b0c93d7047 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManager.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManager.java
@@ -16,8 +16,8 @@
package com.opensymphony.xwork2.util.fs;
import com.opensymphony.xwork2.FileManager;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.IOException;
import java.io.InputStream;
@@ -36,7 +36,7 @@
*/
public class DefaultFileManager implements FileManager {
- private static Logger LOG = LoggerFactory.getLogger(DefaultFileManager.class);
+ private static Logger LOG = LogManager.getLogger(DefaultFileManager.class);
private static final Pattern JAR_PATTERN = Pattern.compile("^(jar:|wsjar:|zip:|vfsfile:|code-source:)?(file:)?(.*?)(\\!/|\\.jar/)(.*)");
private static final int JAR_FILE_PATH = 3;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java
index ce53a153c9..741d297da3 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java
@@ -5,8 +5,8 @@
import com.opensymphony.xwork2.XWorkConstants;
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.HashSet;
import java.util.Set;
@@ -16,7 +16,7 @@
*/
public class DefaultFileManagerFactory implements FileManagerFactory {
- private static final Logger LOG = LoggerFactory.getLogger(DefaultFileManagerFactory.class);
+ private static final Logger LOG = LogManager.getLogger(DefaultFileManagerFactory.class);
private boolean reloadingConfigs;
private FileManager systemFileManager;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/JarEntryRevision.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/JarEntryRevision.java
index 43fc749aaa..b2c968414b 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/JarEntryRevision.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/JarEntryRevision.java
@@ -1,8 +1,8 @@
package com.opensymphony.xwork2.util.fs;
import com.opensymphony.xwork2.FileManager;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.apache.commons.io.FileUtils;
import java.io.IOException;
@@ -15,7 +15,7 @@
*/
public class JarEntryRevision extends Revision {
- private static Logger LOG = LoggerFactory.getLogger(JarEntryRevision.class);
+ private static Logger LOG = LogManager.getLogger(JarEntryRevision.class);
private static final String JAR_FILE_NAME_SEPARATOR = "!/";
private static final String JAR_FILE_EXTENSION_END = ".jar/";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java
index 13727e5681..d9bbf27128 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java
@@ -26,8 +26,8 @@
*/
package com.opensymphony.xwork2.util.profiling;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
@@ -282,7 +282,7 @@ public class UtilTimerStack
*/
public static final String MIN_TIME = "xwork.profile.mintime";
- private static final Logger LOG = LoggerFactory.getLogger(UtilTimerStack.class);
+ private static final Logger LOG = LogManager.getLogger(UtilTimerStack.class);
/**
* Initialized in a static block, it can be changed at runtime by calling setActive(...)
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
index 9b6beb3063..b1c475d8b6 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
@@ -26,8 +26,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.validator.validators.VisitorFieldValidator;
import org.apache.commons.lang3.StringUtils;
@@ -59,7 +59,7 @@ public class AnnotationActionValidatorManager implements ActionValidatorManager
private final Map> validatorCache = Collections.synchronizedMap(new HashMap>());
private final Map> validatorFileCache = Collections.synchronizedMap(new HashMap>());
- private static final Logger LOG = LoggerFactory.getLogger(AnnotationActionValidatorManager.class);
+ private static final Logger LOG = LogManager.getLogger(AnnotationActionValidatorManager.class);
private ValidatorFactory validatorFactory;
private ValidatorFileParser validatorFileParser;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java
index b6d0211e98..f139401d39 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java
@@ -22,8 +22,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.validator.validators.VisitorFieldValidator;
import java.io.IOException;
@@ -52,7 +52,7 @@ public class DefaultActionValidatorManager implements ActionValidatorManager {
private final Map> validatorCache = Collections.synchronizedMap(new HashMap>());
private final Map> validatorFileCache = Collections.synchronizedMap(new HashMap>());
- private final Logger LOG = LoggerFactory.getLogger(DefaultActionValidatorManager.class);
+ private final Logger LOG = LogManager.getLogger(DefaultActionValidatorManager.class);
private ValidatorFactory validatorFactory;
private ValidatorFileParser validatorFileParser;
private FileManager fileManager;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFactory.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFactory.java
index 0b19e2403a..3f980236e3 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFactory.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFactory.java
@@ -21,8 +21,8 @@
import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.io.File;
import java.io.FilenameFilter;
@@ -50,7 +50,7 @@
public class DefaultValidatorFactory implements ValidatorFactory {
protected Map validators = new HashMap();
- private static Logger LOG = LoggerFactory.getLogger(DefaultValidatorFactory.class);
+ private static Logger LOG = LogManager.getLogger(DefaultValidatorFactory.class);
protected ObjectFactory objectFactory;
protected ValidatorFileParser validatorFileParser;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java
index 603b8fa638..b640996f04 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java
@@ -21,8 +21,8 @@
import com.opensymphony.xwork2.config.providers.XmlHelper;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.DomHelper;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
@@ -45,7 +45,7 @@
*/
public class DefaultValidatorFileParser implements ValidatorFileParser {
- private static Logger LOG = LoggerFactory.getLogger(DefaultValidatorFileParser.class);
+ private static Logger LOG = LogManager.getLogger(DefaultValidatorFileParser.class);
static final String DEFAULT_MULTI_TEXTVALUE_SEPARATOR = " ";
static final String MULTI_TEXTVALUE_SEPARATOR_CONFIG_KEY = "xwork.validatorfileparser.multi_textvalue_separator";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java
index 6807926c71..c47d277963 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java
@@ -17,8 +17,8 @@
import com.opensymphony.xwork2.*;
import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import java.util.*;
@@ -259,11 +259,11 @@ private static class LoggingValidationAware implements ValidationAware {
private Logger log;
public LoggingValidationAware(Class clazz) {
- log = LoggerFactory.getLogger(clazz);
+ log = LogManager.getLogger(clazz);
}
public LoggingValidationAware(Object obj) {
- log = LoggerFactory.getLogger(obj.getClass());
+ log = LogManager.getLogger(obj.getClass());
}
public void setActionErrors(Collection errorMessages) {
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java
index 34024875ba..84788ca068 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java
@@ -21,8 +21,8 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
import com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
/**
*
@@ -130,7 +130,7 @@ public class ValidationInterceptor extends MethodFilterInterceptor {
private ActionValidatorManager actionValidatorManager;
- private static final Logger LOG = LoggerFactory.getLogger(ValidationInterceptor.class);
+ private static final Logger LOG = LogManager.getLogger(ValidationInterceptor.class);
private final static String VALIDATE_PREFIX = "validate";
private final static String ALT_VALIDATE_PREFIX = "validateDo";
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RangeValidatorSupport.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RangeValidatorSupport.java
index 22eb3412f4..183ea655d9 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RangeValidatorSupport.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RangeValidatorSupport.java
@@ -15,8 +15,8 @@
*/
package com.opensymphony.xwork2.validator.validators;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.validator.ValidationException;
import org.apache.commons.lang3.StringUtils;
@@ -25,7 +25,7 @@
*/
public abstract class RangeValidatorSupport extends FieldValidatorSupport {
- private static final Logger LOG = LoggerFactory.getLogger(RangeValidatorSupport.class);
+ private static final Logger LOG = LogManager.getLogger(RangeValidatorSupport.class);
private final Class type;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
index 0c6fc13863..778c522dbf 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
@@ -16,8 +16,8 @@
package com.opensymphony.xwork2.validator.validators;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.validator.ValidationException;
import org.apache.commons.lang3.StringUtils;
@@ -80,7 +80,7 @@
*/
public class RegexFieldValidator extends FieldValidatorSupport {
- private static final Logger LOG = LoggerFactory.getLogger(RegexFieldValidator.class);
+ private static final Logger LOG = LogManager.getLogger(RegexFieldValidator.class);
private String regex;
private String regexExpression;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java
index 348b5ce511..b6f7014e7a 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java
@@ -19,8 +19,8 @@
import com.opensymphony.xwork2.ActionInvocation;
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 org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.validator.ValidationException;
import org.apache.commons.lang3.StringEscapeUtils;
@@ -134,7 +134,7 @@
*/
public abstract class RepopulateConversionErrorFieldValidatorSupport extends FieldValidatorSupport {
- private static final Logger LOG = LoggerFactory.getLogger(RepopulateConversionErrorFieldValidatorSupport.class);
+ private static final Logger LOG = LogManager.getLogger(RepopulateConversionErrorFieldValidatorSupport.class);
private boolean repopulateField = false;
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java
index 69c5e6ab18..9dd3f50b6a 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java
@@ -17,8 +17,8 @@
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;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
import com.opensymphony.xwork2.validator.DelegatingValidatorContext;
import com.opensymphony.xwork2.validator.ShortCircuitableValidator;
import com.opensymphony.xwork2.validator.ValidationException;
@@ -39,7 +39,7 @@
*/
public abstract class ValidatorSupport implements Validator, ShortCircuitableValidator {
- protected final Logger log = LoggerFactory.getLogger(this.getClass());
+ protected final Logger log = LogManager.getLogger(this.getClass());
protected String defaultMessage = "";
protected String messageKey;
diff --git a/xwork-core/src/test/java/com/opensymphony/xwork2/ActionSupportTest.java b/xwork-core/src/test/java/com/opensymphony/xwork2/ActionSupportTest.java
index 23206abb4d..06e7f06803 100644
--- a/xwork-core/src/test/java/com/opensymphony/xwork2/ActionSupportTest.java
+++ b/xwork-core/src/test/java/com/opensymphony/xwork2/ActionSupportTest.java
@@ -17,11 +17,7 @@
import com.opensymphony.xwork2.util.ValueStack;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.ResourceBundle;
+import java.util.*;
/**
* Unit test for {@link ActionSupport}.
diff --git a/xwork-core/src/test/java/com/opensymphony/xwork2/UnknownHandlerManagerMock.java b/xwork-core/src/test/java/com/opensymphony/xwork2/UnknownHandlerManagerMock.java
index 8b6eb5aa3c..b27024a0f1 100644
--- a/xwork-core/src/test/java/com/opensymphony/xwork2/UnknownHandlerManagerMock.java
+++ b/xwork-core/src/test/java/com/opensymphony/xwork2/UnknownHandlerManagerMock.java
@@ -1,7 +1,5 @@
package com.opensymphony.xwork2;
-import com.opensymphony.xwork2.DefaultUnknownHandlerManager;
-
import java.util.ArrayList;
/*
diff --git a/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/TimerInterceptorTest.java b/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/TimerInterceptorTest.java
index f658536ba1..424d6076e2 100644
--- a/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/TimerInterceptorTest.java
+++ b/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/TimerInterceptorTest.java
@@ -19,7 +19,7 @@
import com.opensymphony.xwork2.XWorkTestCase;
import com.opensymphony.xwork2.mock.MockActionInvocation;
import com.opensymphony.xwork2.mock.MockActionProxy;
-import com.opensymphony.xwork2.util.logging.Logger;
+import org.apache.logging.log4j.Logger;
/**
* Unit test for {@link TimerInterceptor}.