 (ns metabase.logger
-  (:require [clj-time.core :as t]
-            [clj-time.coerce :as coerce]
-            [clj-time.format :as time]
-            [amalloy.ring-buffer :refer [ring-buffer]])
+  (:require [amalloy.ring-buffer :refer [ring-buffer]]
+            (clj-time [core :as t]
+                      [coerce :as coerce]
+                      [format :as time]))
   (:gen-class
-    :extends org.apache.log4j.AppenderSkeleton
-    :name metabase.logger.Appender)
+   :extends org.apache.log4j.AppenderSkeleton
+   :name metabase.logger.Appender)
   (:import (org.apache.log4j.spi LoggingEvent)))
 
 (def ^:private ^:const max-log-entries 2500)

(def ^:private formatter (time/formatter "MMM dd HH:mm:ss" (t/default-time-zone)))

(defn -append
  "docstring"
  [_ ^LoggingEvent event]
  (let [ts    (time/unparse formatter (coerce/from-long (.getTimeStamp event)))
        level (.getLevel event)
        fqns  (.getLoggerName event)

    nil))

(defn -close
  "No-op if something tries to close this logging appender.
   [Overrides an `Appender` method](http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Appender.html#close())"
  [_]
  nil)

(defn -requiresLayout
  "The MB logger doesn't require a layout.
  [Overrides an `Appender` method](http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Appender.html#getLayout())"
  [_]
  false)
