Permalink
Browse files

sections log on their own

  • Loading branch information...
1 parent 4ffacac commit c7980174410d02c30fed7c2ddfdaa2f6e0d53291 @duck1123 duck1123 committed Aug 5, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/ciste/sections.clj
View
@@ -101,6 +101,10 @@ Example:
[record# & others#]
(apply ~type-name# record# others#)))))
+(defn log-section
+ [sym dispatch-val]
+ (log/debugf "%s %s" sym dispatch-val))
+
(defmacro defsection
[name dispatch-val binding-form & body]
(let [name# name]
@@ -118,7 +122,7 @@ Example:
full-symbol# (symbol (str declared-ns# "/" method-name#))]
`(defmethod ~full-symbol# ~dispatch-val#
~binding-form
- (log/debugf "%s %s" '~full-symbol# '~dispatch-val#)
+ (log-section '~full-symbol# '~dispatch-val#)
~@body))
(throw (IllegalArgumentException. (str "Can not resolve section: " name))))))

0 comments on commit c798017

Please sign in to comment.