You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2016/08/12 08:15:36 UTC
[3/4] camel git commit: CAMEL-10224: Upgrade log4j to lg4j2
(camel-hbase)
CAMEL-10224: Upgrade log4j to lg4j2 (camel-hbase)
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dc109a1b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dc109a1b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dc109a1b
Branch: refs/heads/master
Commit: dc109a1bc395a9a6570e75d8a4850421b0e48de0
Parents: b171d1f
Author: lburgazzoli <lb...@gmail.com>
Authored: Fri Aug 12 10:08:50 2016 +0200
Committer: lburgazzoli <lb...@gmail.com>
Committed: Fri Aug 12 10:08:50 2016 +0200
----------------------------------------------------------------------
components/camel-hbase/pom.xml | 127 ++++++++++++++++++-
.../src/test/resources/log4j.properties | 38 ------
.../src/test/resources/log4j2.properties | 5 +-
parent/pom.xml | 5 +
4 files changed, 132 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/dc109a1b/components/camel-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-hbase/pom.xml b/components/camel-hbase/pom.xml
index f45b264..a3b381a 100644
--- a/components/camel-hbase/pom.xml
+++ b/components/camel-hbase/pom.xml
@@ -56,6 +56,14 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<!-- because hbase-client 1.1.1 use hadoop2.5.1 by default, check is it still required by the next version update -->
@@ -63,12 +71,32 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-auth</artifactId>
<version>${hadoop2-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- because hbase-client 1.1.1 use hadoop2.5.1 by default, check is it still required by the next version update -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<version>${hadoop2-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
@@ -103,6 +131,14 @@
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -160,6 +196,14 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<!-- because hbase-server 1.1.1 use hadoop2.5.1 by default, check is it still required by the next version update -->
@@ -169,6 +213,16 @@
<version>${hadoop2-version}</version>
<classifier>tests</classifier>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- because hbase-server 1.1.1 use hadoop2.5.1 by default, check is it still required by the next version update -->
<dependency>
@@ -177,6 +231,16 @@
<version>${hadoop2-version}</version>
<classifier>tests</classifier>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
@@ -197,6 +261,14 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<!-- because hbase-testing-util 1.1.1 use hadoop2.5.1 by default, check is it still required by the next version update -->
@@ -207,6 +279,16 @@
<type>test-jar</type>
<classifier>tests</classifier>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- because hbase-testing-util 1.1.1 use hadoop2.5.1 by default, check is it still required by the next version update -->
<dependency>
@@ -214,6 +296,16 @@
<artifactId>hadoop-minicluster</artifactId>
<version>${hadoop2-version}</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- Using a low version of guava could let the server shutdown quickly -->
@@ -228,13 +320,40 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
- <!-- hadoop-minicluster has hardcoded log4j deps -->
+ <!-- logging -->
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>test</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- workaround for org.apache.log4j.AppenderSkeleton -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>log4j-over-slf4j</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/camel/blob/dc109a1b/components/camel-hbase/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-hbase/src/test/resources/log4j.properties b/components/camel-hbase/src/test/resources/log4j.properties
deleted file mode 100644
index 534faf4..0000000
--- a/components/camel-hbase/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-#
-# The logging properties used for testing
-#
-log4j.rootLogger=INFO, file
-log4j.logger.org.apache.camel.component.hbase=WARN, out
-
-# uncomment the following line to turn on Camel debugging
-#log4j.logger.org.apache.camel=DEBUG
-#log4j.logger.org.apache.camel.component.hbase=TRACE
-
-# CONSOLE appender not used by default
-log4j.appender.out=org.apache.log4j.ConsoleAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-
-# File appender
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.file=target/camel-hbase-test.log
-log4j.appender.file.append=true
-log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
http://git-wip-us.apache.org/repos/asf/camel/blob/dc109a1b/components/camel-hbase/src/test/resources/log4j2.properties
----------------------------------------------------------------------
diff --git a/components/camel-hbase/src/test/resources/log4j2.properties b/components/camel-hbase/src/test/resources/log4j2.properties
index 92ef805..7a6103d 100644
--- a/components/camel-hbase/src/test/resources/log4j2.properties
+++ b/components/camel-hbase/src/test/resources/log4j2.properties
@@ -20,12 +20,15 @@ appender.file.name = file
appender.file.fileName = target/camel-hbase-test.log
appender.file.layout.type = PatternLayout
appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
appender.out.type = Console
appender.out.name = out
appender.out.layout.type = PatternLayout
appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
logger.hbase.name = org.apache.camel.component.hbase
logger.hbase.level = WARN
-#logger.hbase.appenderRef.out.ref = out
+logger.hbase.additivity = true
+
rootLogger.level = INFO
rootLogger.appenderRef.file.ref = file
http://git-wip-us.apache.org/repos/asf/camel/blob/dc109a1b/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 548f6a6..fd13e6b 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -2198,6 +2198,11 @@
<version>${slf4j-version}</version>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>log4j-over-slf4j</artifactId>
+ <version>${slf4j-version}</version>
+ </dependency>
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>