Skip to content

Instantly share code, notes, and snippets.

@coltnz
Created February 12, 2015 00:28
Show Gist options
  • Save coltnz/852e153b69677320bd3c to your computer and use it in GitHub Desktop.
Save coltnz/852e153b69677320bd3c to your computer and use it in GitHub Desktop.
set clojure tools logging level in repl (logback version)
; in user.clj
(:import [org.slf4j LoggerFactory]
[ch.qos.logback.classic Logger Level]
(defn set-log-level! [level]
(.. (LoggerFactory/getLogger org.slf4j.Logger/ROOT_LOGGER_NAME)
(setLevel (Level/valueOf (.toUpperCase (name level))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment