                 :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#)

         (extend org.apache.commons.logging.Log
           Logger
           {:enabled?
            (fn [logger# level#]
              (condp = level#
                :trace (.isTraceEnabled logger#)
                :debug (.isDebugEnabled logger#)

         (extend org.apache.log4j.Logger
           Logger
           {:enabled?
            (fn [^org.apache.log4j.Logger logger# level#]
              (.isEnabledFor logger#
                 (or
                   (levels# level#)
                   (throw (IllegalArgumentException. (str level#))))))
            :write!
            (fn [^org.apache.log4j.Logger logger# level# e# msg#]
              (let [level# (or
                             (levels# level#)
                             (throw (IllegalArgumentException. (str level#))))]
