   ;; This will block, waiting for the threadpool to shutdown
   (when-not (.awaitTermination threadpool shutdown-timeout java.util.concurrent.TimeUnit/MILLISECONDS)
 
-    (log/warn "Attempted to shutdown threadpool, not stopped after 5 minutes, forcibly shutting it down")
+    (log/warn
+     (i18n/trs "Threadpool not stopped after {0} milliseconds, forcibly shutting it down" shutdown-timeout))
 
     ;; This will force the shutdown of the threadpool and will
     ;; not allow current threads to finish
     (.shutdownNow threadpool)
-    (log/warn "Threadpool forcibly shutdown")))
+    (log/warn
+     (i18n/trs "Threadpool forcibly shutdown"))))
 
 (defrecord GatedThreadpool [^Semaphore semaphore ^ExecutorService threadpool shutdown-timeout]
   java.io.Closeable

                             (finally
                               (.release semaphore)))))
    (catch RejectedExecutionException e
      (log/error e "Message not submitted to command processing threadpool")
      (.release semaphore))))

(defn exec-from-channel

            RejectedExecutionException ExecutorService]
           [org.apache.commons.lang3.concurrent BasicThreadFactory BasicThreadFactory$Builder])
  (:require [clojure.core.async :as async]
            [clojure.tools.logging :as log]
            [puppetlabs.i18n.core :as i18n]))

(def logging-exception-handler
  "Exception handler that ensures any uncaught exception that occurs
  on this thread is logged"
  (reify Thread$UncaughtExceptionHandler
    (uncaughtException [_ thread throwable]
      (log/error throwable
                 (i18n/trs "Error processing command")))))

(defn thread-factory
  "Creates a command thread factory, wrapping the
