CAMEL-11896: Need to use -1 as unlimted as spring boot will use 0 as default and we dont want to set the global option if so. This closes #2040
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4a656a23 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4a656a23 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4a656a23 Branch: refs/heads/master Commit: 4a656a2324876c460b2cd286552d16e646bcad51 Parents: 9b8116d Author: Claus Ibsen <davscl...@apache.org> Authored: Mon Oct 16 09:21:15 2017 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Mon Oct 16 09:26:48 2017 +0200 ---------------------------------------------------------------------- .../org/apache/camel/spring/boot/CamelAutoConfiguration.java | 4 +++- .../apache/camel/spring/boot/CamelConfigurationProperties.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/4a656a23/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java index b5b3e76..b6331a2 100644 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java +++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java @@ -140,7 +140,9 @@ public class CamelAutoConfiguration { camelContext.getShutdownStrategy().setShutdownRoutesInReverseOrder(config.isShutdownRoutesInReverseOrder()); camelContext.getShutdownStrategy().setLogInflightExchangesOnTimeout(config.isShutdownLogInflightExchangesOnTimeout()); - camelContext.getGlobalOptions().put(Exchange.LOG_DEBUG_BODY_MAX_CHARS, "" + config.getLogDebugMaxChars()); + if (config.getLogDebugMaxChars() != 0) { + camelContext.getGlobalOptions().put(Exchange.LOG_DEBUG_BODY_MAX_CHARS, "" + config.getLogDebugMaxChars()); + } // stream caching camelContext.setStreamCaching(config.isStreamCachingEnabled()); http://git-wip-us.apache.org/repos/asf/camel/blob/4a656a23/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java index 1739625..9882a13 100644 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java +++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java @@ -192,8 +192,8 @@ public class CamelConfigurationProperties { /** * Is used to limit the maximum length of the logging Camel message bodies. If the message body - * is longer than the limit, the log message is clipped. Use a value of 0 or negative to have unlimited length. - * Use for example 1000 to log at at most 1000 chars. + * is longer than the limit, the log message is clipped. Use -1 to have unlimited length. + * Use for example 1000 to log at most 1000 characters. */ private int logDebugMaxChars;