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 4fbf4a6  Polished
4fbf4a6 is described below

commit 4fbf4a61f6290de48d966c052d9647a8f8e10084
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Dec 9 06:58:17 2020 +0100

    Polished
---
 .../apache/camel/language/csimple/joor/JoorCSimpleCompiler.java    | 3 ++-
 .../java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java | 7 +++----
 .../java/org/apache/camel/main/DefaultMainShutdownStrategy.java    | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/components/camel-csimple-joor/src/main/java/org/apache/camel/language/csimple/joor/JoorCSimpleCompiler.java
 
b/components/camel-csimple-joor/src/main/java/org/apache/camel/language/csimple/joor/JoorCSimpleCompiler.java
index fe0e96a..d05b7ce 100644
--- 
a/components/camel-csimple-joor/src/main/java/org/apache/camel/language/csimple/joor/JoorCSimpleCompiler.java
+++ 
b/components/camel-csimple-joor/src/main/java/org/apache/camel/language/csimple/joor/JoorCSimpleCompiler.java
@@ -31,6 +31,7 @@ import org.apache.camel.spi.annotations.JdkService;
 import org.apache.camel.support.ScriptHelper;
 import org.apache.camel.support.service.ServiceSupport;
 import org.apache.camel.util.StopWatch;
+import org.apache.camel.util.TimeUtils;
 import org.joor.Reflect;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -156,7 +157,7 @@ public class JoorCSimpleCompiler extends ServiceSupport 
implements CSimpleCompil
     protected void doStop() throws Exception {
         super.doStop();
         if (counter > 0) {
-            LOG.info("csimple-joor compiled {} scripts in {} millis", counter, 
taken);
+            LOG.info("csimple-joor compiled {} scripts in {}", counter, 
TimeUtils.printDuration(taken));
         }
     }
 
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
index d780914..b03e7b8 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
@@ -54,6 +54,7 @@ import org.apache.camel.support.service.ServiceHelper;
 import org.apache.camel.support.service.ServiceSupport;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.StopWatch;
+import org.apache.camel.util.TimeUtils;
 import org.apache.camel.util.URISupport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -264,10 +265,8 @@ public class DefaultShutdownStrategy extends 
ServiceSupport implements ShutdownS
             currentShutdownTaskFuture = null;
         }
 
-        // convert to seconds as its easier to read than a big milli seconds 
number
-        long seconds = TimeUnit.SECONDS.convert(watch.taken(), 
TimeUnit.MILLISECONDS);
-
-        LOG.info("Graceful shutdown of {} routes completed in {} seconds", 
routesOrdered.size(), seconds);
+        LOG.info("Graceful shutdown of {} routes completed in {}", 
routesOrdered.size(),
+                TimeUtils.printDuration(watch.taken()));
         return true;
     }
 
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultMainShutdownStrategy.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultMainShutdownStrategy.java
index e027a7f..a72243f 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultMainShutdownStrategy.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultMainShutdownStrategy.java
@@ -29,8 +29,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Implementation of {@link MainShutdownStrategy} that add a virtual machine 
shutdown hook to properly stop the main
- * instance.
+ * Implementation of {@link MainShutdownStrategy} that add a virtual machine 
shutdown hook
+ * to properly stop the main instance.
  */
 public class DefaultMainShutdownStrategy extends SimpleMainShutdownStrategy {
     protected static final Logger LOG = 
LoggerFactory.getLogger(DefaultMainShutdownStrategy.class);
@@ -72,7 +72,7 @@ public class DefaultMainShutdownStrategy extends 
SimpleMainShutdownStrategy {
     }
 
     private void handleHangup() {
-        LOG.info("Received hang up - stopping the main instance.");
+        LOG.info("Received hangup signal, stopping the main instance.");
         // and shutdown listener to allow camel context to graceful shutdown 
if JVM shutdown hook is triggered
         // as otherwise the JVM terminates before Camel is graceful shutdown
         addShutdownListener(() -> {

Reply via email to