struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject [25/50] [abbrv] struts-examples git commit: WW-4504 - Mark current logging layer as @deprecated and use Log4j2 as default one
Date Thu, 11 Jun 2015 19:17:02 GMT
WW-4504 - Mark current logging layer as @deprecated and use Log4j2 as default one

- Use log4j2 Logger and LogManager instead of xwork implementation everywhere


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

Branch: refs/heads/master
Commit: 1a072a25ff3f4a6641023d1f72cffcd6352d69ed
Parents: 5283b4a
Author: Johannes Geppert <johgep@gmail.com>
Authored: Mon May 25 12:42:19 2015 +0200
Committer: Johannes Geppert <johgep@gmail.com>
Committed: Mon May 25 12:42:23 2015 +0200

----------------------------------------------------------------------
 src/main/java/mailreader2/ApplicationListener.java  | 16 +++++-----------
 .../java/mailreader2/AuthenticationInterceptor.java |  7 ++++---
 src/main/java/mailreader2/Login.java                |  2 +-
 src/main/java/mailreader2/MailreaderSupport.java    | 11 +++++------
 4 files changed, 15 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/1a072a25/src/main/java/mailreader2/ApplicationListener.java
----------------------------------------------------------------------
diff --git a/src/main/java/mailreader2/ApplicationListener.java b/src/main/java/mailreader2/ApplicationListener.java
index 2233375..35e39fd 100644
--- a/src/main/java/mailreader2/ApplicationListener.java
+++ b/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.*;
 
 /**
  * <p><code>ServletContextListener</code> that initializes and finalizes
the
@@ -100,7 +94,7 @@ public final class ApplicationListener implements ServletContextListener
{
     /**
      * <p>Logging output for this plug in instance.</p>
      */
-    private Logger log = LoggerFactory.getLogger(this.getClass());
+    private Logger log = LogManager.getLogger(this.getClass());
 
     // ------------------------------------------------------------- Properties
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/1a072a25/src/main/java/mailreader2/AuthenticationInterceptor.java
----------------------------------------------------------------------
diff --git a/src/main/java/mailreader2/AuthenticationInterceptor.java b/src/main/java/mailreader2/AuthenticationInterceptor.java
index 254d968..77470a5 100644
--- a/src/main/java/mailreader2/AuthenticationInterceptor.java
+++ b/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 () {}

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/1a072a25/src/main/java/mailreader2/Login.java
----------------------------------------------------------------------
diff --git a/src/main/java/mailreader2/Login.java b/src/main/java/mailreader2/Login.java
index 0efa19b..d4c1403 100644
--- a/src/main/java/mailreader2/Login.java
+++ b/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;
 
 /**
  * <p> Validate a user login. </p>

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/1a072a25/src/main/java/mailreader2/MailreaderSupport.java
----------------------------------------------------------------------
diff --git a/src/main/java/mailreader2/MailreaderSupport.java b/src/main/java/mailreader2/MailreaderSupport.java
index 02bad38..0136284 100644
--- a/src/main/java/mailreader2/MailreaderSupport.java
+++ b/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.struts.apps.mailreader.dao.impl.memory.MemoryUser;
 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;
 
 /**
  * <p> Base Action for MailreaderSupport application. </p>
@@ -388,7 +387,7 @@ public class MailreaderSupport extends ActionSupport
     /**
      * <p><code>Log</code> instance for this application. </p>
      */
-    protected Logger log = LoggerFactory.getLogger(Constants.PACKAGE);
+    protected Logger log = LogManager.getLogger(Constants.PACKAGE);
 
     /**
      * <p> Persist the User object, including subscriptions, to the database.


Mime
View raw message