Skip to content

Commit

Permalink
Coerce return values of isErrorEnabled etc to Boolean because timbre …
Browse files Browse the repository at this point in the history
…may return nil causing NPE

Fixes taoensso/timbre#206
  • Loading branch information
rufoa committed Jun 26, 2018
1 parent bcba662 commit fc6aa70
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/slf4j_timbre/adapter.clj
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@


(defn -isErrorEnabled
([_] (timbre/log? :error))
([_ _] (timbre/log? :error)))
([_] (boolean (timbre/log? :error)))
([_ _] (boolean (timbre/log? :error))))
(defn -isWarnEnabled
([_] (timbre/log? :warn))
([_ _] (timbre/log? :warn)))
([_] (boolean (timbre/log? :warn)))
([_ _] (boolean (timbre/log? :warn))))
(defn -isInfoEnabled
([_] (timbre/log? :info))
([_ _] (timbre/log? :info)))
([_] (boolean (timbre/log? :info)))
([_ _] (boolean (timbre/log? :info))))
(defn -isDebugEnabled
([_] (timbre/log? :debug))
([_ _] (timbre/log? :debug)))
([_] (boolean (timbre/log? :debug)))
([_ _] (boolean (timbre/log? :debug))))
(defn -isTraceEnabled
([_] (timbre/log? :trace))
([_ _] (timbre/log? :trace)))
([_] (boolean (timbre/log? :trace)))
([_ _] (boolean (timbre/log? :trace))))

0 comments on commit fc6aa70

Please sign in to comment.