struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [1/4] struts-examples git commit: Switches to Log4j2
Date Wed, 13 Jan 2016 16:25:17 GMT
Repository: struts-examples
Updated Branches:
  refs/heads/master 9a5ae2a43 -> cc5b6790d


Switches to Log4j2


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

Branch: refs/heads/master
Commit: dc3eed1d409820d761670f43f607edc5ddc6befe
Parents: 9a5ae2a
Author: Lukasz Lenart <lukasz.lenart@gmail.com>
Authored: Wed Jan 13 17:23:50 2016 +0100
Committer: Lukasz Lenart <lukasz.lenart@gmail.com>
Committed: Wed Jan 13 17:23:50 2016 +0100

----------------------------------------------------------------------
 tiles/src/main/resources/log4j.properties | 55 --------------------------
 tiles/src/main/resources/log4j2.xml       | 15 +++++++
 2 files changed, 15 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/dc3eed1d/tiles/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/tiles/src/main/resources/log4j.properties b/tiles/src/main/resources/log4j.properties
deleted file mode 100644
index 7046b49..0000000
--- a/tiles/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,55 +0,0 @@
-#------------------------------------------------------------------------------
-#
-#  The following properties set the logging levels and log appender.  The
-#  log4j.rootCategory variable defines the default log level and one or more
-#  appenders.  For the console, use 'S'.  For the daily rolling file, use 'R'.
-#  For an HTML formatted log, use 'H'.
-#
-#  To override the default (rootCategory) log level, define a property of the
-#  form (see below for available values):
-#
-#        log4j.logger. =
-#
-#    Available logger names:
-#      TODO
-#
-#    Possible Log Levels:
-#      FATAL, ERROR, WARN, INFO, DEBUG
-#
-#------------------------------------------------------------------------------
-log4j.rootCategory=INFO, CONSOLE
-
-#------------------------------------------------------------------------------
-#
-#  The following properties configure the console (stdout) appender.
-#  See http://logging.apache.org/log4j/docs/api/index.html for details.
-#
-#------------------------------------------------------------------------------
-log4j.appender.CONSOLE = org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.layout = org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %t %c{1} [%p] %m%n
-
-#------------------------------------------------------------------------------
-#
-#  The following properties configure the Daily Rolling File appender.
-#  See http://logging.apache.org/log4j/docs/api/index.html for details.
-#
-#------------------------------------------------------------------------------
-#log4j.appender.S = org.apache.log4j.DailyRollingFileAppender
-#log4j.appender.S.File = demo.log
-#log4j.appender.S.Append = true
-#log4j.appender.S.DatePattern = '.'yyy-MM-dd
-#log4j.appender.S.layout = org.apache.log4j.PatternLayout
-#log4j.appender.S.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %t %c{1} [%p] %m%n
-
-#------------------------------------------------------------------------------
-#
-#  The following properties configure the Rolling File appender in HTML.
-#  See http://logging.apache.org/log4j/docs/api/index.html for details.
-#
-#------------------------------------------------------------------------------
-#log4j.appender.H = org.apache.log4j.RollingFileAppender
-#log4j.appender.H.File = logs/apps.html
-#log4j.appender.H.MaxFileSize = 100KB
-#log4j.appender.H.Append = false
-#log4j.appender.H.layout = org.apache.log4j.HTMLLayout

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/dc3eed1d/tiles/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/tiles/src/main/resources/log4j2.xml b/tiles/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9a695b4
--- /dev/null
+++ b/tiles/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="trace"/>
+    <Logger name="org.apache.struts2" level="trace"/>
+    <Root level="warn">
+      <AppenderRef ref="STDOUT"/>
+    </Root>
+  </Loggers>
+</Configuration>
\ No newline at end of file


Mime
View raw message