Skip to content

Commit

Permalink
Use encore get-env impln
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Dec 27, 2015
1 parent 663f1a7 commit e48dea5
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/taoensso/timbre.cljx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
(:require-macros [taoensso.timbre :as timbre-macros :refer ()]))

(if (vector? taoensso.encore/encore-version)
(enc/assert-min-encore-version [2 29 1])
(enc/assert-min-encore-version 2.29))
(enc/assert-min-encore-version [2 31 3])
(enc/assert-min-encore-version 2.31))

;;;; Config

Expand Down Expand Up @@ -513,13 +513,7 @@
result# ; NOT subject to elision
))))

(defn- clear-meta [x] (if (meta x) (with-meta x nil) x))
(defmacro get-env [] (let [ks (mapv clear-meta (keys &env))] `(zipmap '~ks [~@ks])))

(comment
(let [x :x] (get-env))
((fn [^long x] (get-env)) 0))

(defmacro get-env [] `(enc/get-env))
(defmacro log-env
"Logs named &env value.
Defaults to :debug logging level and \"&env\" as name."
Expand Down

0 comments on commit e48dea5

Please sign in to comment.