You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/08/14 14:23:00 UTC
[camel] branch main updated: (chores) camel-rocketmq: fixed logging configuration (#11104)
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 6a1b98e5a6a (chores) camel-rocketmq: fixed logging configuration (#11104)
6a1b98e5a6a is described below
commit 6a1b98e5a6a4d23fe50fc65062199072df1cd490
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Mon Aug 14 16:22:54 2023 +0200
(chores) camel-rocketmq: fixed logging configuration (#11104)
---
components/camel-rocketmq/pom.xml | 7 +++++++
.../camel-rocketmq/src/test/resources/logback-test.xml | 18 +++++++++++-------
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/components/camel-rocketmq/pom.xml b/components/camel-rocketmq/pom.xml
index b083bb2ba8d..be04f5bbe05 100644
--- a/components/camel-rocketmq/pom.xml
+++ b/components/camel-rocketmq/pom.xml
@@ -56,6 +56,13 @@
<version>${rocketmq-version}</version>
</dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>${logback-version}</version>
+ <scope>test</scope>
+ </dependency>
+
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-infra-rocketmq</artifactId>
diff --git a/components/camel-rocketmq/src/test/resources/logback-test.xml b/components/camel-rocketmq/src/test/resources/logback-test.xml
index d45c9a37733..ea126b360b1 100644
--- a/components/camel-rocketmq/src/test/resources/logback-test.xml
+++ b/components/camel-rocketmq/src/test/resources/logback-test.xml
@@ -18,15 +18,19 @@
-->
<configuration>
- <appender name="DefaultAppender" class="ch.qos.logback.core.ConsoleAppender">
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <file>target/camel-rocketmq-test.log</file>
+ <append>true</append>
<encoder>
- <pattern>%d{yyy-MM-dd HH:mm:ss} [%p] [%t] - %m%n</pattern>
- <charset class="java.nio.charset.Charset">UTF-8</charset>
+ <pattern>%d [%-15.15t] %-5p %-30.30c{1} - %m%n</pattern>
</encoder>
</appender>
-
- <root>
- <level value="OFF"/>
- <appender-ref ref="DefaultAppender"/>
+
+ <root level="INFO">
+ <appender-ref ref="FILE" />
</root>
+
+ <logger name="org.apache.camel.component.rocketmq" level="DEBUG" additivity="false" >
+ <appender-ref ref="FILE" />
+ </logger>
</configuration>