Hi,
I think I remember seeing a macro somewhere in one of the clojure libraries in the main distribution or in portal itself that:
1. tap> s a value but then returns the tapped value instead of true, so that I can enclose any form in the macro and not affect code function.
2. also logs the form itself as well as the returned value and/or the line number, file name where the tap> happens and more.
In the same library there were macros for tapping threaded expressions as well I think.
Am I misremembering or can someone point me to the macro(s).
J
Ah, looking at portal.console now.
just what I was looking for 🙂
thanks a lot for the great work @djblue
FWIW (doto tap>) in a -> pipeline will do what you want:
(-> expr
(doto tap>) ; tap expr
(process) ; process expr
(doto tap>)) ; tap result(although that won't handle exceptions the same way portal.console/log does)
oh, that's handy thanks @seancorfield