   860)
 
 (defn get-access-log-handler
+  "Setup access logging for each application.  Access log entries will go to stdout similar to
+  application logging.  As a result the access log entries will be in the same log as the
+  application log."
   [existing-handler]
   (doto (RequestLogHandler.)
     (.setHandler existing-handler)

        (.setLogLatency true)))))

(defn get-gzip-handler
  [existing-handler]
  (doto (GzipHandler.)
    (.setHandler existing-handler)
    (.setMinGzipSize MIN_GZIP_SIZE)))

(defrecord WebServer
  [


        (let [handler
              (when use-compression?
                (get-gzip-handler (get-access-log-handler (.getHandler server)) MIN_GZIP_SIZE)
                (get-access-log-handler (.getHandler server)))]
          (doto server
            (.stop)
