diff --git a/CHANGELOG.md b/CHANGELOG.md index 26a2626..0cea894 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,4 @@ -## v2.5.0 → v2.6.0 - * Perf: make ns filtering a compile-time check. +## v2.5.0 → v2.6.1 * Perf: add support for a compile-time logging level environment variable (`TIMBRE_LOG_LEVEL`). See `timbre/compile-time-level` docstring for details. diff --git a/README.md b/README.md index 673b3ba..3bafe5f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ **[API docs](http://ptaoussanis.github.io/timbre/)** | **[CHANGELOG](https://github.com/ptaoussanis/timbre/blob/master/CHANGELOG.md)** | [contact & contributing](#contact--contributing) | [other Clojure libs](https://www.taoensso.com/clojure-libraries) | [Twitter](https://twitter.com/#!/ptaoussanis) | current [semantic](http://semver.org/) version: ```clojure -[com.taoensso/timbre "2.6.0"] ; See CHANGELOG for breaking changes since 1.x +[com.taoensso/timbre "2.6.1"] ; See CHANGELOG for breaking changes since 1.x ``` # Timbre, a (sane) Clojure logging & profiling library @@ -27,7 +27,7 @@ Logging with Java can be maddeningly, unnecessarily hard. Particularly if all yo Add the necessary dependency to your [Leiningen](http://leiningen.org/) `project.clj` and `require` the library in your ns: ```clojure -[com.taoensso/timbre "2.6.0"] ; project.clj +[com.taoensso/timbre "2.6.1"] ; project.clj (ns my-app (:require [taoensso.timbre :as timbre :refer (trace debug info warn error fatal spy with-log-level)])) ; ns ``` diff --git a/project.clj b/project.clj index ab049a3..90abddf 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject com.taoensso/timbre "2.6.0" +(defproject com.taoensso/timbre "2.6.1" :description "Clojure logging & profiling library" :url "https://github.com/ptaoussanis/timbre" :license {:name "Eclipse Public License" diff --git a/src/taoensso/timbre.clj b/src/taoensso/timbre.clj index 3014f30..77e98f0 100644 --- a/src/taoensso/timbre.clj +++ b/src/taoensso/timbre.clj @@ -334,13 +334,13 @@ (defmacro logging-enabled? "Returns true iff current logging level is sufficient and current namespace - unfiltered. The namespace test is compile-time, the logging-level test - compile-time iff a compile-time logging level was specified." - [level & body] - (when (@ns-filter-cache *ns*) - (if compile-time-level - (sufficient-level? level) - `(sufficient-level? ~level)))) + unfiltered. The namespace test is runtime, the logging-level test compile-time + iff a compile-time logging level was specified." + [level] + (if compile-time-level + (when (sufficient-level? level) + `(@ns-filter-cache *ns*)) + `(and (sufficient-level? ~level) (@ns-filter-cache *ns*)))) (comment (def compile-time-level :info)