CAMEL-10224: Upgrade log4j to lg4j2 (camel-sip)
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b9f91f4d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b9f91f4d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b9f91f4d Branch: refs/heads/master Commit: b9f91f4d3eebaf19201a7f50d504262e6c7e2e08 Parents: dc109a1 Author: lburgazzoli <lburgazz...@gmail.com> Authored: Fri Aug 12 10:14:24 2016 +0200 Committer: lburgazzoli <lburgazz...@gmail.com> Committed: Fri Aug 12 10:14:24 2016 +0200 ---------------------------------------------------------------------- components/camel-sip/pom.xml | 24 +++++++++++-- .../src/test/resources/log4j.properties | 38 -------------------- .../src/test/resources/log4j2.properties | 34 ++++++++++++++++++ 3 files changed, 55 insertions(+), 41 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/b9f91f4d/components/camel-sip/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-sip/pom.xml b/components/camel-sip/pom.xml index 5f75321..18de011 100644 --- a/components/camel-sip/pom.xml +++ b/components/camel-sip/pom.xml @@ -64,10 +64,28 @@ <artifactId>junit</artifactId> <scope>test</scope> </dependency> + <!-- 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/b9f91f4d/components/camel-sip/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/components/camel-sip/src/test/resources/log4j.properties b/components/camel-sip/src/test/resources/log4j.properties deleted file mode 100644 index 11dafd8..0000000 --- a/components/camel-sip/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 eclipse testing, We want to see debug output on the console. -# -log4j.rootLogger=INFO, file - -# uncomment the following to enable camel debugging -log4j.logger.org.apache.camel.component.sip=TRACE -#log4j.logger.org.apache.camel=DEBUG -#log4j.logger.org.apache.commons.net=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=[%30.30t] %-30.30c{1} %-5p %m%n -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.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n -log4j.appender.file.file=target/camel-sip-test.log http://git-wip-us.apache.org/repos/asf/camel/blob/b9f91f4d/components/camel-sip/src/test/resources/log4j2.properties ---------------------------------------------------------------------- diff --git a/components/camel-sip/src/test/resources/log4j2.properties b/components/camel-sip/src/test/resources/log4j2.properties new file mode 100644 index 0000000..2b5e2eb --- /dev/null +++ b/components/camel-sip/src/test/resources/log4j2.properties @@ -0,0 +1,34 @@ +## --------------------------------------------------------------------------- +## 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. +## --------------------------------------------------------------------------- + +appender.file.type = File +appender.file.name = file +appender.file.fileName = target/camel-sip-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.sip.name = org.apache.camel.component.sip +logger.sip.level = TRACE +logger.sip.additivity = true + +rootLogger.level = INFO +rootLogger.appenderRef.file.ref = file