You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/02/03 08:21:05 UTC

[camel] 01/03: Camel-Weka: Should use log4j2

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f31ac4044b4e15e352712d17d321642bfb0e5d12
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 3 09:10:50 2020 +0100

    Camel-Weka: Should use log4j2
---
 components/camel-weka/pom.xml                      | 14 +++++++++--
 .../camel-weka/src/test/resources/log4j.properties | 21 ----------------
 .../src/test/resources/log4j2.properties           | 28 ++++++++++++++++++++++
 3 files changed, 40 insertions(+), 23 deletions(-)

diff --git a/components/camel-weka/pom.xml b/components/camel-weka/pom.xml
index d961ba3..b8c7227 100644
--- a/components/camel-weka/pom.xml
+++ b/components/camel-weka/pom.xml
@@ -58,8 +58,18 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <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>
     </dependencies>
diff --git a/components/camel-weka/src/test/resources/log4j.properties b/components/camel-weka/src/test/resources/log4j.properties
deleted file mode 100644
index f24e9f8..0000000
--- a/components/camel-weka/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Root logger option
-log4j.rootLogger=DEBUG, file, console
-
-# Thirdparty categories
-#log4j.logger.com.foo.bar=ERROR
-
-# Direct log messages to a log file
-log4j.appender.file=org.apache.log4j.RollingFileAppender
-log4j.appender.file.file=target/debug.log
-log4j.appender.file.append=false
-log4j.appender.file.maxFileSize=10MB
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p - %m%n
-log4j.appender.file.threshold=DEBUG
- 
-# Direct log messages to console
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.target=System.out
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%m%n
-log4j.appender.console.threshold=ERROR
diff --git a/components/camel-weka/src/test/resources/log4j2.properties b/components/camel-weka/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..b13ce9c
--- /dev/null
+++ b/components/camel-weka/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## 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-weka-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
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file