You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/06/25 04:01:37 UTC

[camel] 07/12: Lets use logback as logger as its more tiny and faster than log4j

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

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

commit 1bd38dce42c164afbf0282f68a969b6e5d5619cf
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Jun 24 14:51:52 2019 +0200

    Lets use logback as logger as its more tiny and faster than log4j
---
 examples/camel-example-main-tiny/pom.xml           | 17 +++++---------
 .../src/main/resources/log4j2.properties           | 26 ----------------------
 .../src/main/resources/logback.xml                 | 11 +++++++++
 3 files changed, 17 insertions(+), 37 deletions(-)

diff --git a/examples/camel-example-main-tiny/pom.xml b/examples/camel-example-main-tiny/pom.xml
index cdc2ae0..2787ac8 100644
--- a/examples/camel-example-main-tiny/pom.xml
+++ b/examples/camel-example-main-tiny/pom.xml
@@ -92,19 +92,14 @@
             <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-slf4j-impl</artifactId>
-            <scope>runtime</scope>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+            <version>1.2.3</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-jul</artifactId>
-            <scope>runtime</scope>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>1.2.3</version>
         </dependency>
 
     </dependencies>
diff --git a/examples/camel-example-main-tiny/src/main/resources/log4j2.properties b/examples/camel-example-main-tiny/src/main/resources/log4j2.properties
deleted file mode 100644
index c63f861..0000000
--- a/examples/camel-example-main-tiny/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,26 +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.
-## ---------------------------------------------------------------------------
-
-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.out.ref = out
-
-logger.camel-main.name = org.apache.camel.main
-logger.camel-main.level = INFO
diff --git a/examples/camel-example-main-tiny/src/main/resources/logback.xml b/examples/camel-example-main-tiny/src/main/resources/logback.xml
new file mode 100644
index 0000000..6156c21
--- /dev/null
+++ b/examples/camel-example-main-tiny/src/main/resources/logback.xml
@@ -0,0 +1,11 @@
+<configuration>
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="INFO">
+        <appender-ref ref="STDOUT" />
+    </root>
+</configuration>
\ No newline at end of file