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 2021/11/11 07:47:25 UTC
[camel] branch main updated: Polished
This is an automated email from the ASF dual-hosted git repository.
davsclaus 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 daf613d Polished
daf613d is described below
commit daf613d068a8fbe5ce93064e7b0ab573d9c328bc
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Nov 10 16:40:18 2021 +0100
Polished
---
.../org/apache/camel/support/cache/DefaultProducerCache.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/cache/DefaultProducerCache.java b/core/camel-support/src/main/java/org/apache/camel/support/cache/DefaultProducerCache.java
index a5b0509..97152e4 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/cache/DefaultProducerCache.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/cache/DefaultProducerCache.java
@@ -133,13 +133,15 @@ public class DefaultProducerCache extends ServiceSupport implements ProducerCach
.build())
.build();
- StopWatch watch = new StopWatch();
+ StopWatch watch = LOG.isDebugEnabled() ? new StopWatch() : null;
if (!task.run(service::isStarting)) {
- LOG.warn("The producer did not finish starting");
+ LOG.warn("The producer: {} did not finish starting in {} ms", service, ACQUIRE_WAIT_TIME);
}
- LOG.debug("Waited {} ms for producer to finish starting: {} state: {}", watch.taken(), service,
- service.getStatus());
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Waited {} ms for producer to finish starting: {} state: {}", watch.taken(), service,
+ service.getStatus());
+ }
}
@Override