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 2020/03/02 08:53:50 UTC

[camel] branch master updated: CAMEL-14632: Fixed log when using multiline should replace token with newline.

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


The following commit(s) were added to refs/heads/master by this push:
     new ea0c5ec  CAMEL-14632: Fixed log when using multiline should replace token with newline.
ea0c5ec is described below

commit ea0c5ec41134b83d5395ee5968657cfa986e026d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 2 09:53:31 2020 +0100

    CAMEL-14632: Fixed log when using multiline should replace token with newline.
---
 .../org/apache/camel/support/processor/DefaultExchangeFormatter.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/camel-support/src/main/java/org/apache/camel/support/processor/DefaultExchangeFormatter.java b/core/camel-support/src/main/java/org/apache/camel/support/processor/DefaultExchangeFormatter.java
index 9c3a6aa..54b0d6e 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/processor/DefaultExchangeFormatter.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/processor/DefaultExchangeFormatter.java
@@ -173,8 +173,8 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
             }
         }
 
-        // only cut if we hit max-chars limit
-        if (maxChars > 0 && sb.length() > maxChars) {
+        // only cut if we hit max-chars limit (or are using multiline
+        if (multiline || (maxChars > 0 && sb.length() > maxChars)) {
             StringBuilder answer = new StringBuilder();
             for (String s : sb.toString().split(SEPARATOR)) {
                 if (s != null) {