             [containium.systems.repl :as repl]
             [containium.systems.ring-analytics :as ring-analytics]
             [containium.systems.mail :as mail]
-            [containium.systems.logging :as logging]
+            [containium.systems.logging :as logging :refer (refer-logging)]
             [containium.exceptions :as ex]
             [containium.commands :as commands]
             [clojure.java.io :refer (resource as-file)]

  See the documentation on the handle-command for more info on this.
  When this function returns (of which its value is of no value, pun
  intended), the `shutdown` command has been issued."
  [systems]
  (let [jline (ConsoleReader. System/in @#'containium.systems.logging/stdout)]
    (loop []
      (let [[command & args] (commands/parse-quoted (.readLine jline "containium> "))]

                                         (logging/stdout-command-logger (:logging systems) command))
                (catch Throwable t
                  (ex/exit-when-fatal t)
                  (error logging "Error handling command" command ":")
                  (error logging t)))
              (recur)))))))


