It adds the ability to trace functions in a multithreaded app (by sending the trace output of each thread to a separate file), and to report exceptions that were thrown.
[fn.trace "1.3.2.0-SNAPSHOT"]
You can trace single functions or entire namespaces (all public fns in that namespace).
(use 'fn.trace)
(dotrace-all [my.ns1
my.ns2
my.other.ns1/fn1]}
(my.ns1/fn1 arg1 arg2)
(my.ns2/fn5 blah blah blah)
(comment "etc, etc"))
You can also exclude fns from a traced namespace as follows:
(use 'fn.trace)
(dotrace (remove #{'my.ns1/verbose-fn1 'my.ns2/other-unwanted-fn1}
(all-fns [my.ns1
my.ns2
my.other.ns1/fn1]}
(my.ns1/fn1 arg1 arg2)
(my.ns2/fn5 blah blah blah)
(comment "etc, etc"))
Trace multithreaded:
(use 'fn.trace)
;;this code should be located somewhere where each thread you want to
;;trace will hit it
(binding [tracer (per-thread-tracer)]
(dotrace (remove ['my.ns1/verbose-fn1 'my.ns2/other-unwanted-fn1]
(all-fns [my.ns1
my.ns2
my.other.ns1/fn1]}
(my.ns1/fn1 arg1 arg2)
(my.ns2/fn5 blah blah blah)
(comment "etc, etc")))