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

      (assert (contains? LEVELS lvl))
      (.setLevel LOGGER (lvl LEVELS)))))

(defn- print-handler []
  (let [formatter (SimpleFormatter.)]
    (proxy [StreamHandler] []
      (publish [msg] (println (.format formatter msg))))))


     :author "Jeff Rose"}
  overtone.util.log
  (:import [java.util.logging Logger Level ConsoleHandler FileHandler
            StreamHandler Formatter LogRecord]
           [java.util Date])
  (:use [overtone.config store]
        [clojure.pprint :only (pprint)]))

; Sets up some basic logging infrastructure and helpers for the project.

(defonce LOGGER (Logger/getLogger "overtone"))

(defonce LOG-APPEND true)
(defonce LOG-CONSOLE (ConsoleHandler.))

(def LOG-FILE-HANDLER (FileHandler. OVERTONE-LOG-FILE LOG-APPEND))
