           (proxy-super handle target request req res))))))
 
 
+(defn set-log-level! [log-lvl]
+  (let [level (or ({:all     StdErrLog/LEVEL_ALL
+                    :debug   StdErrLog/LEVEL_DEBUG
+                    :info    StdErrLog/LEVEL_INFO
+                    :off     StdErrLog/LEVEL_OFF
+                    :warn    StdErrLog/LEVEL_WARN } log-lvl)
+                  StdErrLog/LEVEL_WARN)]
+    (doto (Log/getRootLogger)
+      (.setLevel level))
+    (doseq [[k v] (Log/getLoggers)]
+      (.setLevel v level))))
 
 (defn async-websocket-configurator [{:keys [websockets async-handlers]}]
   (fn [server]

                                   ws-proxy-handlers
                                   async-proxy-handlers
                                   [existing-handler]))))]
      (.setHandler server contexts))))

(defn run-jetty [handler {:keys [websockets async-handlers] :as options}]
  (jt/run-jetty
   handler
   (cond-> options
     (or (not-empty websockets) (not-empty async-handlers))
     (assoc :configurator (async-websocket-configurator
                           (select-keys options
                                        [:websockets :async-handlers]))))))

;; Figwheel REPL adapter


    HandlerList]
   [org.eclipse.jetty.websocket.servlet
    WebSocketServletFactory WebSocketCreator
    ServletUpgradeRequest ServletUpgradeResponse]
   [org.eclipse.jetty.util.log Log StdErrLog]
   ))

;; ------------------------------------------------------
;; Jetty 9 Websockets
