Skip to content

Commit

Permalink
[#151] Allow compile-time log level to be set with system property
Browse files Browse the repository at this point in the history
This is useful since it allows one to dynamically set the log level
prior to ClojureScript compilation. Specifically, I would like to
use this inside of a Boot task.
  • Loading branch information
domkm authored and ptaoussanis committed Feb 26, 2016
1 parent acf9ee8 commit eefad45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/taoensso/timbre.cljx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@

(comment (qb 10000 (level>= :info :debug)))

#+clj (defn- env-val [id] (when-let [s (System/getenv id)] (enc/read-edn s)))
#+clj (defn- env-val [id] (when-let [s (or (System/getProperty id) (System/getenv id))] (enc/read-edn s)))
#+clj (def ^:private compile-time-level
(have [:or nil? valid-level]
(keyword (or (env-val "TIMBRE_LEVEL")
Expand Down

0 comments on commit eefad45

Please sign in to comment.