Return-Path: X-Original-To: apmail-struts-commits-archive@minotaur.apache.org Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B40318AE0 for ; Thu, 11 Jun 2015 19:16:40 +0000 (UTC) Received: (qmail 56225 invoked by uid 500); 11 Jun 2015 19:16:39 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 56090 invoked by uid 500); 11 Jun 2015 19:16:39 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 56013 invoked by uid 99); 11 Jun 2015 19:16:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2015 19:16:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B7918E04AC; Thu, 11 Jun 2015 19:16:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jogep@apache.org To: commits@struts.apache.org Date: Thu, 11 Jun 2015 19:16:39 -0000 Message-Id: <79391712be3a4cacb71031c3a16a4b82@git.apache.org> In-Reply-To: <313deeaf0a3943d5bd3d59b3d025953e@git.apache.org> References: <313deeaf0a3943d5bd3d59b3d025953e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/50] [abbrv] struts-examples git commit: WW-4492 Add support for Log4J2 as a struts and xwork logging backend WW-4492 Add support for Log4J2 as a struts and xwork logging backend - Use new log4j2 in blank and rest showcase app - Migrate to newer jetty plugin version Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/05216e09 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/05216e09 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/05216e09 Branch: refs/heads/master Commit: 05216e091e49567f5181334db5f741d4c354ee29 Parents: a40ac26 Author: Johannes Geppert Authored: Sat Apr 18 21:15:48 2015 +0200 Committer: Johannes Geppert Committed: Sat Apr 18 21:15:48 2015 +0200 ---------------------------------------------------------------------- pom.xml | 18 +++++++++++++++--- src/main/resources/log4j.properties | 26 -------------------------- src/main/resources/log4j2.xml | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/05216e09/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 979f077..c105dd8 100644 --- a/pom.xml +++ b/pom.xml @@ -48,8 +48,14 @@ - log4j - log4j + org.apache.logging.log4j + log4j-api + 2.2 + + + org.apache.logging.log4j + log4j-core + 2.2 @@ -64,7 +70,7 @@ org.mortbay.jetty jetty-maven-plugin - 8.1.7.v20120910 + 8.1.16.v20140903 CTRL+C 8999 @@ -72,6 +78,12 @@ src/main/webapp/WEB-INF/web.xml + + + xwork.loggerFactory + com.opensymphony.xwork2.util.logging.log4j2.Log4j2LoggerFactory + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/05216e09/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties deleted file mode 100644 index 3c5af7c..0000000 --- a/src/main/resources/log4j.properties +++ /dev/null @@ -1,26 +0,0 @@ -# -# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging) -# -# The five logging levels used by Log are (in order): -# -# 1. DEBUG (the least serious) -# 2. INFO -# 3. WARN -# 4. ERROR -# 5. FATAL (the most serious) - - -# Set root logger level to WARN and append to stdout -log4j.rootLogger=INFO, stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - -# Pattern to output the caller's file name and line number. -log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n - -# Print only messages of level ERROR or above in the package noModule. -log4j.logger.noModule=FATAL - -log4j.logger.com.opensymphony.xwork2=DEBUG -log4j.logger.org.apache.struts2=DEBUG http://git-wip-us.apache.org/repos/asf/struts-examples/blob/05216e09/src/main/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml new file mode 100644 index 0000000..aee8b3b --- /dev/null +++ b/src/main/resources/log4j2.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file