       (assert (contains? LEVELS lvl))
       (.setLevel LOGGER (lvl LEVELS)))))
 
+(defn- log-formatter []
+  (proxy [Formatter] []
+    (format [^LogRecord log-rec]
+      (let [lvl (REVERSE-LEVELS (.getLevel log-rec))
+            msg (.getMessage log-rec)
+            ts (.getMillis log-rec)]
+        (with-out-str (pprint {:level lvl
+                               :timestamp ts
+                               :date (Date. (long ts))
+                               :msg msg}))))))
+
 (defn- print-handler []
-  (let [formatter (SimpleFormatter.)]
+  (let [formatter (log-formatter)]
     (proxy [StreamHandler] []
       (publish [msg] (println (.format formatter msg))))))
 

(defonce LOG-SETUP?
  (do
    (level DEFAULT-LEVEL)
    (.setFormatter LOG-FILE-HANDLER (SimpleFormatter.))
    (.addHandler LOGGER LOG-FILE-HANDLER)
    true))


             :info  Level/INFO
             :warn  Level/WARNING
             :error Level/SEVERE})

(def REVERSE-LEVELS (apply hash-map (flatten (map reverse LEVELS))))

(def DEFAULT-LEVEL :warn)

