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

  (:import [jline.console ConsoleReader]
           [java.util Timer TimerTask])
  (:gen-class))


;;; Globals for REPL access. A necessary evil.

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