From eefad451d7d9d5021604979e177232c5fbac085d Mon Sep 17 00:00:00 2001 From: Dom Kiva-Meyer Date: Mon, 8 Feb 2016 12:17:52 -0800 Subject: [PATCH] [#151] Allow compile-time log level to be set with system property 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. --- src/taoensso/timbre.cljx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/taoensso/timbre.cljx b/src/taoensso/timbre.cljx index 249e44a..69fc0db 100644 --- a/src/taoensso/timbre.cljx +++ b/src/taoensso/timbre.cljx @@ -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")