Permalink
Browse files

TLOG-7: avoid reflection

  • Loading branch information...
1 parent 0056f62 commit 4fcef0831ba4f2108e0bafe5103df89eeeab5c71 @ataggart ataggart committed May 5, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/main/clojure/clojure/tools/logging/impl.clj
@@ -43,7 +43,7 @@
(extend org.slf4j.Logger
Logger
{:enabled?
- (fn [logger# level#]
+ (fn [^org.slf4j.Logger logger# level#]
(condp = level#
:trace (.isTraceEnabled logger#)
:debug (.isDebugEnabled logger#)
@@ -90,7 +90,7 @@
(extend org.apache.commons.logging.Log
Logger
{:enabled?
- (fn [logger# level#]
+ (fn [^org.apache.commons.logging.Log logger# level#]
(condp = level#
:trace (.isTraceEnabled logger#)
:debug (.isDebugEnabled logger#)
@@ -100,7 +100,7 @@
:fatal (.isFatalEnabled logger#)
(throw (IllegalArgumentException. (str level#)))))
:write!
- (fn [logger# level# e# msg#]
+ (fn [^org.apache.commons.logging.Log logger# level# e# msg#]
(if e#
(condp = level#
:trace (.trace logger# msg# e#)
@@ -141,13 +141,13 @@
(extend org.apache.log4j.Logger
Logger
{:enabled?
- (fn [logger# level#]
+ (fn [^org.apache.log4j.Logger logger# level#]
(.isEnabledFor logger#
(or
(levels# level#)
(throw (IllegalArgumentException. (str level#))))))
:write!
- (fn [logger# level# e# msg#]
+ (fn [^org.apache.log4j.Logger logger# level# e# msg#]
(let [level# (or
(levels# level#)
(throw (IllegalArgumentException. (str level#))))]
@@ -177,13 +177,13 @@
(extend java.util.logging.Logger
Logger
{:enabled?
- (fn [logger# level#]
+ (fn [^java.util.logging.Logger logger# level#]
(.isLoggable logger#
(or
(levels# level#)
(throw (IllegalArgumentException. (str level#))))))
:write!
- (fn [logger# level# ^Throwable e# msg#]
+ (fn [^java.util.logging.Logger logger# level# ^Throwable e# msg#]
(let [^java.util.logging.Level level#
(or
(levels# level#)

0 comments on commit 4fcef08

Please sign in to comment.