Permalink
Browse files

log views

  • Loading branch information...
1 parent c798017 commit d30f33bf2abbe5f37b2ecc86e58c2443dec68e7c @duck1123 duck1123 committed Aug 27, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/ciste/views.clj
View
@@ -31,12 +31,16 @@ Example:
^{:doc "Fallback view for when no view can be found for the action"}
apply-view-by-format (fn [& _] *format*))
+(defn log-view
+ [action format]
+ (log/debugf "Running view for [%s %s]" action format))
+
(defmacro defview
"Define a view for the action with the specified format"
[action format args & body]
`(defmethod ciste.views/apply-view [~action ~format]
~args
- (log/debugf "Running view for [%s %s]" ~action ~format)
+ (log-view ~action ~format)
~@body))
(defmethod apply-view :default

0 comments on commit d30f33b

Please sign in to comment.