struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject [28/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:05 GMT
WW-4504 - Mark current logging layer as @deprecated and use Log4j2 as default one

- Use log4j2 in all provided apps


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

Branch: refs/heads/master
Commit: d10ec54114b4ea657612a9199cc3a5edfb0e91be
Parents: 67d0594
Author: Johannes Geppert <johgep@gmail.com>
Authored: Mon May 25 21:42:08 2015 +0200
Committer: Johannes Geppert <johgep@gmail.com>
Committed: Mon May 25 21:42:08 2015 +0200

----------------------------------------------------------------------
 pom.xml                       |  8 ++++++++
 src/main/resources/log4j2.xml | 15 +++++++++++++++
 2 files changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/d10ec541/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0b395cc..07f0166 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,6 +48,14 @@
             <version>2.0</version>
             <scope>provided</scope>
         </dependency>
+
+        <!-- Logging -->
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <version>${log4j2.version}</version>
+        </dependency>
+
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>struts2-junit-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/d10ec541/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..abe3dde
--- /dev/null
+++ b/src/main/resources/log4j2.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration>
+    <Appenders>
+        <Console name="STDOUT" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Logger name="com.opensymphony.xwork2" level="info"/>
+        <Logger name="org.apache.struts2" level="info"/>
+        <Root level="info">
+            <AppenderRef ref="STDOUT"/>
+        </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file


Mime
View raw message