Skip to content

Commit

Permalink
[nop] Update Encore dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Feb 22, 2024
1 parent 830b03e commit b84ac61
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:test-paths ["test" #_"src"]

:dependencies
[[com.taoensso/encore "3.68.0"]
[[com.taoensso/encore "3.80.0"]
[io.aviso/pretty "1.4.4"]]

:profiles
Expand Down
44 changes: 21 additions & 23 deletions src/taoensso/timbre.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#?(:cljs (:require-macros [taoensso.timbre])))

(enc/assert-min-encore-version [3 68 0])
(enc/assert-min-encore-version [3 80 0])

(comment
(remove-ns 'taoensso.timbre)
Expand Down Expand Up @@ -163,10 +163,10 @@
#?(:clj
(defonce ^:private compile-time-min-level
(let [level
(enc/read-sys-val*
[:taoensso.timbre.min-level
:timbre-level ; Legacy
:timbre-log-level ; Legacy
(enc/get-env {:as :edn}
[:taoensso.timbre.min-level<.edn>
:timbre-level<.edn> ; Legacy
:timbre-log-level<.edn> ; Legacy
])

level (if (string? level) (keyword level) level) ; Legacy
Expand All @@ -188,14 +188,14 @@
(defonce ^:private compile-time-ns-filter
(let [ns-pattern
(or
(enc/read-sys-val*
[:taoensso.timbre.ns-pattern
:timbre-ns-pattern ; Legacy
(enc/get-env {:as :edn}
[:taoensso.timbre.ns-pattern<.edn>
:timbre-ns-pattern<.edn> ; Legacy
])

(legacy-ns-filter ; Legacy
(enc/read-sys-val* [:timbre-ns-whitelist])
(enc/read-sys-val* [:timbre-ns-blacklist])))
(enc/get-env {:as :edn} :timbre-ns-whitelist<.edn>)
(enc/get-env {:as :edn} :timbre-ns-blacklist<.edn>)))

ns-pattern ; Support legacy :whitelist, :blacklist
(if (map? ns-pattern)
Expand Down Expand Up @@ -296,11 +296,11 @@

;;;; Utils

#?(:clj (defmacro get-env [] `(enc/get-env)))
#?(:clj (defmacro get-env [] `(enc/get-locals)))
(comment ((fn foo [x y] (get-env)) 5 10))

#?(:clj (defonce ^:private get-agent (enc/fmemoize (fn [appender-id ] (agent nil :error-mode :continue)))))
(do (defonce ^:private get-rate-limiter (enc/fmemoize (fn [appender-id specs] (enc/limiter specs)))))
(do (defonce ^:private get-rate-limiter (enc/fmemoize (fn [appender-id specs] (enc/rate-limiter specs)))))

(comment
(get-agent :my-appender)
Expand Down Expand Up @@ -489,9 +489,9 @@

#?(:clj
(def ^:private default-stacktrace-fonts
(enc/read-sys-val*
[:taoensso.timbre.default-stacktrace-fonts ; Undocumented
:timbre-defaut-stacktrace-fonts ; Legacy
(enc/get-env {:as :edn}
[:taoensso.timbre.default-stacktrace-fonts<.edn> ; Undocumented
:timbre-defaut-stacktrace-fonts<.edn> ; Legacy
])))

(defn default-output-error-fn
Expand Down Expand Up @@ -1238,16 +1238,14 @@

#?(:cljs default-config
:clj
(let [{:keys [config source]}
(enc/get-config
{:as :edn
:default default-config
:prop :taoensso.timbre.config})
(let [{:keys [source value]}
(enc/get-env {:as :edn, :return :map}
:taoensso.timbre.config<.edn>)

config (enc/nested-merge default-config config)]
value (enc/nested-merge default-config value)]

(assoc config :_init-config
{:loaded-from-source source
(assoc value :_init-config
{:loaded-from-source (or source :default)
:compile-time-config @compile-time-config_}))))

;;;; Deprecated
Expand Down

0 comments on commit b84ac61

Please sign in to comment.