WW-4504 - Mark current logging layer as @deprecated and use Log4j2 as default one
- Use log4j2 in all archetypes Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/93a307b9 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/93a307b9 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/93a307b9 Branch: refs/heads/master Commit: 93a307b95ea11dcebbd20e6ed205fb2384c17105 Parents: 88649ff Author: Johannes Geppert <joh...@gmail.com> Authored: Mon May 25 21:47:03 2015 +0200 Committer: Johannes Geppert <joh...@gmail.com> Committed: Mon May 25 21:47:03 2015 +0200 ---------------------------------------------------------------------- .../main/resources/archetype-resources/pom.xml | 5 ----- .../main/resources/archetype-resources/pom.xml | 6 ------ .../main/resources/archetype-resources/pom.xml | 5 ----- .../main/resources/archetype-resources/pom.xml | 6 ++++++ .../src/main/resources/log4j2.xml | 16 ++++++++++++++++ .../main/resources/archetype-resources/pom.xml | 13 ++++--------- .../src/main/resources/log4j.properties | 20 -------------------- .../src/main/resources/log4j2.xml | 17 +++++++++++++++++ 8 files changed, 43 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/93a307b9/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml index b008115..ff31ad8 100644 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml @@ -49,11 +49,6 @@ <dependency> <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-api</artifactId> - <version>\${log4j2.version}</version> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>\${log4j2.version}</version> </dependency> http://git-wip-us.apache.org/repos/asf/struts/blob/93a307b9/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml b/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml index 87883a7..e6f625c 100644 --- a/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml @@ -35,12 +35,6 @@ <scope>test</scope> </dependency> - - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-api</artifactId> - <version>\${log4j2.version}</version> - </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> http://git-wip-us.apache.org/repos/asf/struts/blob/93a307b9/archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml b/archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml index ebfb0de..5844509 100644 --- a/archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml @@ -43,11 +43,6 @@ <dependency> <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-api</artifactId> - <version>\${log4j2.version}</version> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>\${log4j2.version}</version> </dependency> http://git-wip-us.apache.org/repos/asf/struts/blob/93a307b9/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml b/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml index c254752..62a0e8f 100644 --- a/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml @@ -92,6 +92,12 @@ <scope>provided</scope> </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>\${log4j2.version}</version> + </dependency> + </dependencies> <build> http://git-wip-us.apache.org/repos/asf/struts/blob/93a307b9/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/resources/log4j2.xml b/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/resources/log4j2.xml new file mode 100644 index 0000000..6d27d12 --- /dev/null +++ b/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/resources/log4j2.xml @@ -0,0 +1,16 @@ +<?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"/> + <Logger name="\${groupId}" level="debug"/> + <Root level="warn"> + <AppenderRef ref="STDOUT"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts/blob/93a307b9/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml b/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml index 007a2d6..6ab6329 100644 --- a/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml @@ -70,16 +70,11 @@ <version>1.3</version> </dependency> + <!-- Logging --> <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.1.3</version> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.17</version> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>\${log4j2.version}</version> </dependency> <!-- Dwr --> http://git-wip-us.apache.org/repos/asf/struts/blob/93a307b9/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/log4j.properties b/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/log4j.properties deleted file mode 100644 index cfd02d8..0000000 --- a/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/log4j.properties +++ /dev/null @@ -1,20 +0,0 @@ - -log4j.rootLogger = DEBUG, stdout - - -log4j.category.com.opensymphony.sitemesh=DEBUG -log4j.category.org.apache.struts2=INFO -log4j.category.org.apache=INFO -log4j.category.catalia=INFO - - - - -log4j.appender.stdout = org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Threshold = DEBUG -log4j.appender.stdout.Target = System.out -log4j.appender.stdout.layout = org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern = %d{ISO8601} %-5p [%F:%L] : %m%n - - - http://git-wip-us.apache.org/repos/asf/struts/blob/93a307b9/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/log4j2.xml b/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/log4j2.xml new file mode 100644 index 0000000..d0cdc6d --- /dev/null +++ b/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/log4j2.xml @@ -0,0 +1,17 @@ +<?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.sitemesh" level="info"/> + <Logger name="com.opensymphony.xwork2" level="info"/> + <Logger name="org.apache.struts2" level="info"/> + <Logger name="\${groupId}" level="debug"/> + <Root level="warn"> + <AppenderRef ref="STDOUT"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file