Created
February 12, 2015 00:28
-
-
Save coltnz/852e153b69677320bd3c to your computer and use it in GitHub Desktop.
set clojure tools logging level in repl (logback version)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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